Fix object storage download

This commit is contained in:
Chocobozzz 2024-01-12 14:07:54 +01:00
parent 0cbe9a471f
commit 1cb3afb2c2
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ export async function generateWebVideoPresignedUrl (options: {
const command = new GetObjectCommand({
Bucket: CONFIG.OBJECT_STORAGE.WEB_VIDEOS.BUCKET_NAME,
Key: buildKey(key, CONFIG.OBJECT_STORAGE.WEB_VIDEOS),
ResponseContentDisposition: `attachment; filename=${encodeURI(downloadFilename)}`
ResponseContentDisposition: `attachment; filename="${encodeURI(downloadFilename)}"`
})
const url = await getSignedUrl(await getClient(), command, { expiresIn: 3600 * 24 })
@ -41,7 +41,7 @@ export async function generateHLSFilePresignedUrl (options: {
const command = new GetObjectCommand({
Bucket: CONFIG.OBJECT_STORAGE.STREAMING_PLAYLISTS.BUCKET_NAME,
Key: buildKey(key, CONFIG.OBJECT_STORAGE.STREAMING_PLAYLISTS),
ResponseContentDisposition: `attachment; filename=${encodeURI(downloadFilename)}`
ResponseContentDisposition: `attachment; filename="${encodeURI(downloadFilename)}"`
})
const url = await getSignedUrl(await getClient(), command, { expiresIn: 3600 * 24 })