From 1cb3afb2c2da86a4b73da632551f8027207d388c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 12 Jan 2024 14:07:54 +0100 Subject: [PATCH] Fix object storage download --- server/core/lib/object-storage/pre-signed-urls.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/core/lib/object-storage/pre-signed-urls.ts b/server/core/lib/object-storage/pre-signed-urls.ts index 8da98e246..97e219d8e 100644 --- a/server/core/lib/object-storage/pre-signed-urls.ts +++ b/server/core/lib/object-storage/pre-signed-urls.ts @@ -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 })