api/middleware/fileUpload.js
Function fileUploadHandler
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const fileUploadHandler = async (req, res, next) => {
// Create a new instance of a multiparty form object
const form = new multiparty.Form();
// Parse the form data from the request body into multiparty
form.parse(req, async (error, fields, files) => {