From aa85d04d3456590ed5db0f5e0dc92ae63b0b723d Mon Sep 17 00:00:00 2001 From: Bobby Wibowo Date: Fri, 22 Jul 2022 04:20:37 +0700 Subject: [PATCH] fix: url uploads failing --- controllers/uploadController.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/controllers/uploadController.js b/controllers/uploadController.js index 2d1262e..9c19508 100644 --- a/controllers/uploadController.js +++ b/controllers/uploadController.js @@ -219,7 +219,8 @@ self.upload = async (req, res) => { req.body = {} // Initially try to parse as multipart - let hasMultipartField = true + // TODO: Check Request's Content-Type instead of always trying to parse as multipart + let hasMultipartField = false const unlinkFiles = async files => { return Promise.all(files.map(async file => {