mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 01:26:12 +02:00
fix: use filename to check for svg, tempPath doesn't always have extension
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user