From 5bcf078a75ee484dc154821ca9ba34fd805118da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 24 Jul 2025 12:07:26 -0400 Subject: [PATCH] fix: use filename to check for svg, tempPath doesn't always have extension --- src/file.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/file.js b/src/file.js index 4c3c911950..7bfc957a94 100644 --- a/src/file.js +++ b/src/file.js @@ -28,7 +28,7 @@ file.saveFileToLocal = async function (filename, folder, tempPath) { winston.verbose(`Saving file ${filename} to : ${uploadPath}`); await mkdirp(path.dirname(uploadPath)); - if (tempPath.endsWith('.svg')) { + if (filename.endsWith('.svg')) { await sanitizeSvg(tempPath); }