Skip to content

Commit b2f5b0c

Browse files
committed
fix: createSignedUrl by including storage endpoint into signedURL before return
1 parent 01967a3 commit b2f5b0c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib/storage/StorageApi.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,13 @@ export class StorageApi {
199199
expiresIn: number
200200
): Promise<{ data: { signedURL: string } | null; error: Error | null }> {
201201
try {
202-
const data = await post(
202+
let data = await post(
203203
`${this.url}/object/sign/${path}`,
204204
{ expiresIn },
205205
{ headers: this.headers }
206206
)
207+
const signedURL = `${this.url}${data.signedURL}`
208+
data = { ...data, signedURL }
207209
return { data, error: null }
208210
} catch (error) {
209211
return { data: null, error }

0 commit comments

Comments
 (0)