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); }