wait for write stream to finish

This commit is contained in:
Hongbo Wu
2024-08-27 14:57:31 +08:00
parent 444c78f0cb
commit 48b3f736f0
4 changed files with 34 additions and 11 deletions

View File

@ -64,6 +64,14 @@ export const generateUploadSignedUrl = async (
return url
}
const createSignedUrl = async (file: File): Promise<string> => {
const signedUrl = await file.getSignedUrl({
action: 'read',
expires: Date.now() + 15 * 60 * 1000, // 15 minutes
})
return signedUrl[0]
}
export const generateDownloadSignedUrl = async (
filePathName: string,
config?: {