I\'m trying to configure multer in my app.js file (using node.js/express) in order to allow users to upload images. I have the following code in app.js:
//va
Problem is that multer({dest:'./uploads/'}) return object, not middleware function. And if we look at the code module that we will see that there are three middlware functions:
multer({dest:'./uploads/'}).single(...)
multer({dest:'./uploads/'}).array(...)
multer({dest:'./uploads/'}).fields(...)
Try one of them.