title: uploading file using multer is not working fully (NodeJS)
body: <p>I am using NodeJS express (MVC) and I am trying to upload an image. I am trying to store the image in an uploads folder but nothing is showing up. When I console.log(req.files), I get the following (req.buffer prints out a long series of double digit numbers and letters). How do I get this to save the image in the folder?   </p>
  
  <pre><code> [ 
     { 
       fieldname: 'file',
       originalname: 'thumbnail.jpg',
       encoding: '7bit',
       mimetype: 'image/jpeg',
       buffer: &lt;Buffer ff d8 ff e0 00 10 4a 46 49 46 00 01 01 00 00 01 00 01 00 00 ff db 00 84 00 09 06 07 0d 0d 10 0e 10 0d 0e 0d 0d 0d 0e 10
   0f 0d 0d 0e 0d 0d 0f  0e 0e 0e ... &gt;,
       size: 1347 
     } 
  ]
  </code></pre>
  
  <p>HTML:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;form action="/bars/upload" method = 'post' enctype="multipart/form-data"&gt;
     &lt;label for='file'&gt;Upload Image&lt;/label&gt;
     &lt;input type="file" name="file" accept="image/*"/&gt;
     &lt;input type="submit" name='submit' value="submit"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>NODE JS</p>
  
  <pre class="lang-js prettyprint-override"><code>var multer  = require('multer'); 
  var upload = multer({ dest:'../public/uploads/' });
  
  router.post('/bars/upload', function (req, res, next) { 
      console.log(req.files);     
      res.send(req.files); 
  });
  </code></pre>