fix: use filename to check for svg, tempPath doesn't always have extension

This commit is contained in:
Barış Soner Uşaklı
2025-07-24 12:07:26 -04:00
parent a8f4c5e63a
commit 5bcf078a75

View File

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