diff --git a/controllers/uploadController.js b/controllers/uploadController.js index a51a8dc..b6f5600 100644 --- a/controllers/uploadController.js +++ b/controllers/uploadController.js @@ -338,6 +338,10 @@ self.actuallyUpload = async (req, res, data = {}) => { // Process files immediately and push into Request.files array if (field.file) { + if (field.name !== 'files[]') { + throw new ClientError(`Unexpected file-type field: ${field.name}`) + } + // Push immediately as we will only be adding props into the file object down the line const file = { albumid: data.albumid,