From e080aea61d728baba5d3bbcc49908b466cc9b29d Mon Sep 17 00:00:00 2001 From: David Arnold Date: Wed, 16 Sep 2020 22:42:34 -0500 Subject: [PATCH] fixup! Hello gridfs lib + fsHooks for mongodb bucket storage --- models/lib/fsHooks/createInterceptDownload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/lib/fsHooks/createInterceptDownload.js b/models/lib/fsHooks/createInterceptDownload.js index f369f7945..c375d03f8 100644 --- a/models/lib/fsHooks/createInterceptDownload.js +++ b/models/lib/fsHooks/createInterceptDownload.js @@ -39,7 +39,7 @@ export const createInterceptDownload = bucket => const getContentDisposition = (name, downloadFlag) => { const dispositionType = downloadFlag === 'true' ? 'attachment;' : 'inline;'; - const encodedName = encodeURIComponent(fileName); + const encodedName = encodeURIComponent(name); const dispositionName = `filename="${encodedName}"; filename=*UTF-8"${encodedName}";`; const dispositionEncoding = 'charset=utf-8';