Skip to content

Commit

Permalink
Fix object storage download
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocobozzz committed Jan 12, 2024
1 parent 0cbe9a4 commit 1cb3afb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/core/lib/object-storage/pre-signed-urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand All @@ -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 })
Expand Down

0 comments on commit 1cb3afb

Please sign in to comment.