title: Multer gives req.file undefined
body: <p>I am trying to upload a file using <code>multer</code>. Here's the code:</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;form action="/" method="post" encrypt="multipart/form-data" &gt;
        &lt;input  name="upl"  type="file" &gt;&lt;/br&gt;
        &lt;input  type="text" name="onenee" &gt;&lt;/br&gt;
        &lt;input type="submit" value="submit" /&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p>NODE JS</p>
  
  <pre><code>var express = require('express');
  // var csrf = require('csurf');
  var passport = require('passport');
  var Product = require('../models/product');
  var multer  = require('multer');
  var upload = multer({ dest: 'public/uploads/' });
  
  var router = express.Router();
  
  router.post('/', upload.single('upl'), function (req, res, next) {
          console.log(' Field name1 '+ req.body.onenee);
          console.log(' Field name2 '+ req.files);
          console.log(' Field name3 '+ req.file);
          res.send(req.file);
  });
  </code></pre>
  
  <p>OUTPUT I GET FROM THE CONSOLE</p>
  
  <blockquote>
    <p>Field name1 hi</p>
    
    <p>Field name2 undefined</p>
    
    <p>Field name3 undefined</p>
    
    <p>POST / 200 15.536 ms - -</p>
  </blockquote>