Express Multer file upload req.body and req.file undefined
<p>I'm trying to upload a file using multer and there isn't a request body or file. Does anyone have any ideas what I'm doing wrong?</p>

<p>This is the html</p>

<pre><code>&lt;form action="/upload" method="post" enctype="multipart/form-data"&gt;
  &lt;input type="file" name="file-uploader"/&gt;
  &lt;input type="submit"/&gt;
&lt;/form&gt;
</code></pre>

<p>This is my js</p>

<pre><code>const express = require('express');
const app = express();
const multer = require('multer');
const upload = multer({ dest: 'uploads/' });
// other stuff
app.post('/upload', upload.single('file-uploader'), (req, res, next) =&gt; {
  console.log(req.file);
  console.log(req.body);
  res.send ({'asdf': 'sadf'});
});
</code></pre>