File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -137,18 +137,23 @@ export class StorageFileApi {
137137 async createSignedUrl (
138138 path : string ,
139139 expiresIn : number
140- ) : Promise < { data : { signedUrl : string } | null ; error : Error | null } > {
140+ ) : Promise < {
141+ data : { signedURL : string } | null
142+ error : Error | null
143+ signedURL : string | null
144+ } > {
141145 try {
142146 const _path = this . _getFinalPath ( path )
143147 let data = await post (
144148 `${ this . url } /object/sign/${ _path } ` ,
145149 { expiresIn } ,
146150 { headers : this . headers }
147151 )
148- data = { signedURL : `${ this . url } ${ data . signedURL } ` }
149- return { data, error : null }
152+ const signedURL = `${ this . url } ${ data . signedURL } `
153+ data = { signedURL }
154+ return { data, error : null , signedURL }
150155 } catch ( error ) {
151- return { data : null , error }
156+ return { data : null , error, signedURL : null }
152157 }
153158 }
154159
You can’t perform that action at this time.
0 commit comments