upload file using multer nodejs code example
Example 1: multer multiple file upload
app.post('/projects', upload.array('uploadedImages', 10), function(req, res, err) {
if (err) {
console.log('error');
console.log(err);
}
var file = req.files;
res.end();
console.log(req.files);
});
Example 2: multer npm
$ npm install --save multer file upload node