title: req.files is undefined when uploading file with multer
body: <p>I am trying to build a Node.js Application in Express.js 4 that uploads an image. I decided to use the <code>multer</code> module but cannot access the uploaded file through <code>req.files</code>.
  Here Is the code I am using. I restricted it to those parts that I believe are relevant.</p>
  
  <p>Jade code:</p>
  
  <pre><code>form(method="POST", action="createPost", enctype="multipart/form-data")
          input(type="file", name="photo")
          br
          input(type="submit" value="upload")
  </code></pre>
  
  <p>in routes/admin.js:</p>
  
  <pre><code>var express = require('express');
  var multer = require('multer');
  var router = express.Router();
  var upload = multer({dest: './uploads/'});
  
  router.post('/createPost', upload.single('photo'), function(req, res, next) {
      console.log('files:', req.files);
      console.log('body:', req.body);
      // more code
  }
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>files: undefined
  body: {}
  </code></pre>
  
  <p>The file is stored in the <code>uploads</code> folder but I cannot access its information in <code>req.files</code>. Can anyone help me?</p>