fix error message, more verbose
This commit is contained in:
2
index.js
2
index.js
@@ -120,7 +120,7 @@ const upload = multer({
|
||||
}
|
||||
if ((!allowedTypes.includes(file.mimetype) && file.mimetype != "application/octet-stream") || !allowedExtensions.includes(extname(file.originalname.toLowerCase()).substring(1))) {
|
||||
console.error('FileFilter: File is of an invalid type ', file)
|
||||
cb("Invalid filetype: " + file, false)
|
||||
cb("Invalid filetype: " + JSON.stringify(file), false)
|
||||
return
|
||||
}
|
||||
cb(null, true)
|
||||
|
||||
Reference in New Issue
Block a user