mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-15 02:07:50 -05:00
catch more errors!
This commit is contained in:
@@ -181,9 +181,11 @@ exports.upload = async function (req, res, next) {
|
|||||||
success: false,
|
success: false,
|
||||||
error: "File Upload"
|
error: "File Upload"
|
||||||
}));*/
|
}));*/
|
||||||
fs.unlink(req.file.path, (err) => {
|
try {
|
||||||
if (err)
|
fs.unlinkSync(req.file.path);
|
||||||
console.log("error deleting: " + req.file.path);
|
} catch (err) {
|
||||||
});
|
console.warn("There was an Error uploading an deleting: " + req.file.path);
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user