Issue with file size validation using multer middleware in Node.js
I’m having an issue with validating the file size using the multer middleware in a Node.js application. I have implemented a custom middleware setFileLimit
to set the file size limit based on the file type, but it seems that the req.file
and req.files
are undefined when the middleware is executed.