title: Fetch API and multer error while uploading file
body: <p>I'm trying to use fetch API to upload files to a node.js server (I'm using github's pollyfill if it has something to do with it: <a href="https://github.com/github/fetch" rel="noreferrer">https://github.com/github/fetch</a>).</p>
  
  <p>The request is done like this:</p>
  
  <pre><code>const data = new FormData();
  data.append('file', file);
  return fetch(this.concatToUrl(url), {
    method: 'post',
    headers: Object.assign({}, this.getHeaders(), {'Content-Type': 'multipart/form-data'}),
    body: data,
  });
  </code></pre>
  
  <p>On the server side I have, this declaration of route:</p>
  
  <pre><code>app.post('/media', upload.single('file'), mediaRoutes.postMedia);
  </code></pre>
  
  <p>And trying to get the file like this:</p>
  
  <pre><code>exports.postMedia = function(req, res) {
    console.log('req.file', req.file, req.files, req.body);
    return res.sendStatus(200);
  }
  </code></pre>
  
  <p>But <code>req.file</code> is not being filled.</p>
  
  <p>Also I'm getting this error from express side:</p>
  
  <pre><code>Error: Multipart: Boundary not found
  [2]     at new Multipart (/Users/jmanzano/Development/web/test/node_modules/busboy/lib/types/multipart.js:58:11)
  [2]     at Multipart (/Users/jmanzano/Development/web/test/node_modules/busboy/lib/types/multipart.js:26:12)
  [2]     at Busboy.parseHeaders (/Users/jmanzano/Development/web/test/node_modules/busboy/lib/main.js:64:22)
  [2]     at new Busboy (/Users/jmanzano/Development/web/test/node_modules/busboy/lib/main.js:21:10)
  [2]     at multerMiddleware (/Users/jmanzano/Development/web/test/node_modules/multer/lib/make-middleware.js:32:16)
  [2]     at Layer.handle [as handle_request] (/Users/jmanzano/Development/web/test/node_modules/express/lib/router/layer.js:95:5)
  [2]     at next (/Users/jmanzano/Development/web/test/node_modules/express/lib/router/route.js:131:13)
  [2]     at Route.dispatch (/Users/jmanzano/Development/web/test/node_modules/express/lib/router/route.js:112:3)
  [2]     at Layer.handle [as handle_request] (/Users/jmanzano/Development/web/test/node_modules/express/lib/router/layer.js:95:5)
  [2]     at /Users/jmanzano/Development/web/test/node_modules/express/lib/router/index.js:277:22
  [2]     at Function.process_params (/Users/jmanzano/Development/web/test/node_modules/express/lib/router/index.js:330:12)
  [2]     at next (/Users/jmanzano/Development/web/test/node_modules/express/lib/router/index.js:271:10)
  [2]     at cors (/Users/jmanzano/Development/web/test/node_modules/cors/lib/index.js:178:7)
  [2]     at /Users/jmanzano/Development/web/test/node_modules/cors/lib/index.js:228:17
  [2]     at originCallback (/Users/jmanzano/Development/web/test/node_modules/cors/lib/index.js:217:15)
  [2]     at /Users/jmanzano/Development/web/test/node_modules/cors/lib/index.js:222:13
  [2]     at optionsCallback (/Users/jmanzano/Development/web/test/node_modules/cors/lib/index.js:203:9)
  [2]     at /Users/jmanzano/Development/web/test/node_modules/cors/lib/index.js:208:7
  [2]     at Layer.handle [as handle_request] (/Users/jmanzano/Development/web/test/node_modules/express/lib/router/layer.js:95:5)
  [2]     at trim_prefix (/Users/jmanzano/Development/web/test/node_modules/express/lib/router/index.js:312:13)
  [2]     at /Users/jmanzano/Development/web/test/node_modules/express/lib/router/index.js:280:7
  [2]     at Function.process_params (/Users/jmanzano/Development/web/test/node_modules/express/lib/router/index.js:330:12)
  </code></pre>
  
  <p>And this is the configuration via middlewares:</p>
  
  <pre><code>app.use(bodyParser.urlencoded({extended: true}));
  app.use(bodyParser.json());
  app.use(expressValidator());
  app.use(logger('dev'));
  app.use(cookieParser());
  app.use(methodOverride());
  app.use(passport.initialize());
  app.use(passport.session());
  app.set('JWTSuperSecret', jwtConfig.secret);
  
  if (process.env.NODE_ENV !== 'production') {
    app.use(cors());
  }
  </code></pre>
  
  <p>Also, this is correctly working with POSTMAN. So, I think I'm doing something wrong with the request.</p>
  
  <p>Thanks!</p>