title: MulterError: Unexpected field at wrappedFileFilter
body: <p>I am trying to upload a file to S3 on Amazon by creating an API,,, however, I am having issues while uploading the file.
  The API has an issue when I select the file using postman I get the error below
  I don't get the source of the issue</p>
  <pre><code>MulterError: Unexpected field
      at wrappedFileFilter (E:\MyProjects\reapmgtapi\node_modules\multer\index.js:40:19)
      at Busboy.&lt;anonymous&gt; (E:\MyProjects\reapmgtapi\node_modules\multer\lib\make-middleware.js:114:7)
      at Busboy.emit (events.js:198:13)
      at Busboy.EventEmitter.emit (domain.js:448:20)
      at Busboy.emit (E:\MyProjects\reapmgtapi\node_modules\busboy\lib\main.js:38:33)
      at PartStream.&lt;anonymous&gt; (E:\MyProjects\reapmgtapi\node_modules\busboy\lib\types\multipart.js:213:13)
      at PartStream.emit (events.js:198:13)
      at PartStream.EventEmitter.emit (domain.js:448:20)
      at HeaderParser.&lt;anonymous&gt; (E:\MyProjects\reapmgtapi\node_modules\dicer\lib\Dicer.js:51:16)
      at HeaderParser.emit (events.js:198:13)
  </code></pre>
  <p><strong>Here are my project files</strong> <br> <br>
  <strong>multer.config.js</strong></p>
  <pre class="lang-js prettyprint-override"><code>const multer = require('multer');
  
  var storage = multer.memoryStorage()
  var upload = multer({ storage: storage });
  
  module.exports = upload;
  </code></pre>
  <p><strong>controller.js</strong></p>
  <pre class="lang-js prettyprint-override"><code>const s3 = require('../config/s3.config');
  const env = require('../config/s3.env');
  
  exports.doUpload = (req, res) =&gt; {
      const params = {
          Bucket: env.Bucket,
          Key: req.file.originalname,
          Body: req.file.buffer
      }
  
      s3.upload(params, (err, data) =&gt; {
          if (err) {
              res.status(500).send(&quot;Error is as follows -&gt; &quot; + err);
          }
          res.send(&quot;File uploaded successfully! -&gt; keyname = &quot; + req.file.originalname);
      });
  }
  </code></pre>
  <p><strong>s3.router.js</strong></p>
  <pre class="lang-js prettyprint-override"><code>let express = require('express');
  let router = express.Router();
  
  let upload = require('../config/multer.config');
  
  const awsWorker = require('../controllers/controller');
  
  router.post('/api/files/upload', upload.single(&quot;file&quot;), awsWorker.doUpload);
  module.exports = router;
  </code></pre>