title: Uploading multiple files with multer in express
body: <p>I was trying to allow uploading of multiple files to my express app but I fell into an error.Whats wrong with this code?</p>
  <pre><code>  var storage = multer.diskStorage(
    {
         destination : function(req,file ,cb){
           cb(null, &quot;./uploaded&quot;)
         },
  
      filename : function(req , file , cb){
         cb(null , file.originalname);
         }
           }
               )
  
         var upload = multer({storage : storage});
  
  
  
       router.post('/upload_img' ,  upload.single('fileupload'), (req,res , err)=&gt;{
        if (err) {
           console.log('error');
           console.log(err);
       }else{
         res.redirect('/upload?upload success');
          console.log(req.files);
               }
                })
  </code></pre>