🎥 Make videos programmatically with React
Update content-disposition-header.ts
Jonny Burger8c60f3ebd68f
diff --git a/packages/lambda/src/shared/content-disposition-header.ts b/packages/lambda/src/shared/content-disposition-header.tsindex 0c8bfc5bc8..6d653d532e 100644--- a/packages/lambda/src/shared/content-disposition-header.ts+++ b/packages/lambda/src/shared/content-disposition-header.ts@@ -47,16 +47,6 @@ const includesHexOfUnsafeChar = (path: string): HexInfo => {return {containsHex: false};};-const encodeUriComponentBySplitting = (path: string): string => {- const splitBySlash = path.split('/');-- const encodedArray = splitBySlash.map((element) => {- return encodeURIComponent(element);- });- const merged = encodedArray.join('/');- return merged;-};-export const getContentDispositionHeader = (behavior: DownloadBehavior | null,): string | undefined => {@@ -77,5 +67,5 @@ export const getContentDispositionHeader = (return `attachment; filename="${behavior.fileName}"`;}- return `attachment; filename="${encodeUriComponentBySplitting(behavior.fileName)}"`;+ return `attachment; filename="${encodeURIComponent(behavior.fileName)}"`;};