From 04b2622ec990fa90a51a2777f8babeeabad6b110 Mon Sep 17 00:00:00 2001 From: daniel-j Date: Sun, 21 Jul 2024 15:29:28 +0200 Subject: [PATCH] fix error message, more verbose --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index cba7f28..d06bc76 100644 --- a/index.js +++ b/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)