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 {
137
137
async createSignedUrl (
138
138
path : string ,
139
139
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
+ } > {
141
145
try {
142
146
const _path = this . _getFinalPath ( path )
143
147
let data = await post (
144
148
`${ this . url } /object/sign/${ _path } ` ,
145
149
{ expiresIn } ,
146
150
{ headers : this . headers }
147
151
)
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 }
150
155
} catch ( error ) {
151
- return { data : null , error }
156
+ return { data : null , error, signedURL : null }
152
157
}
153
158
}
154
159
You can’t perform that action at this time.
0 commit comments