mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-12 08:47:40 -05:00
Fix the error with the crashing
This commit is contained in:
@@ -23,7 +23,7 @@ const client = new S3Client({
|
||||
|
||||
exports.upload = async function (req, res, next) {
|
||||
process.nextTick( async () => {
|
||||
if (!req.file && (path.extname(req.file.originalname)) != '.m4a') {
|
||||
if (!req.file || (path.extname(req.file.originalname)) != '.m4a') {
|
||||
console.warn("[" + req.params.shortName + "] Error file name is wrong or file does not exist");
|
||||
res.status(500);
|
||||
res.send("Error, invalid filename:\n");
|
||||
|
||||
Reference in New Issue
Block a user