From 6792b3c534430585827b0738baa72a3ed25cdcf1 Mon Sep 17 00:00:00 2001 From: Mohamed Marrouchi Date: Fri, 18 Oct 2024 18:05:56 +0100 Subject: [PATCH] fix: filename --- api/src/extensions/channels/offline/base-web-channel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/extensions/channels/offline/base-web-channel.ts b/api/src/extensions/channels/offline/base-web-channel.ts index 591672c..9142394 100644 --- a/api/src/extensions/channels/offline/base-web-channel.ts +++ b/api/src/extensions/channels/offline/base-web-channel.ts @@ -711,7 +711,7 @@ export default class BaseWebChannelHandler< storage: diskStorage({ destination: dirPath, // Set the destination directory for file storage filename: (_req, _file, cb) => { - cb(null, filename); // Set the file name + cb(null, sanitizedFilename); // Set the file name }, }), }).single('file'); // 'file' is the field name in the form