mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-20 06:22:50 +01: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}`);
|
winston.verbose(`Saving file ${filename} to : ${uploadPath}`);
|
||||||
await mkdirp(path.dirname(uploadPath));
|
await mkdirp(path.dirname(uploadPath));
|
||||||
if (tempPath.endsWith('.svg')) {
|
if (filename.endsWith('.svg')) {
|
||||||
await sanitizeSvg(tempPath);
|
await sanitizeSvg(tempPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user