title: Nodejs empty request body from form-data POST
body: <p>I have a photo app (React Native) that is attempting to make a POST request to a nodejs express endpoint, with the photo and some metadata. The node app uploads the photo to s3.</p>
  
  <p>Using multer, the photo + s3 bits work swimmingly, but I just can't seem to access the metadata. It's coming across empty.</p>
  
  <p><strong>Client: React Native</strong></p>
  
  <pre><code>var formData = new FormData();
  
  formData.append('photo', {
    uri: this.state.photo.uri,
    name: 'image.jpg',
    type: 'image/jpeg',
  });
  
  formData.append('meta', {
    title: "the best title",
    lat: this.state.lat,
    long: this.state.long
  });
  
  const config = {
    method: 'POST',
    body: formData,
    headers: {
      'Accept': 'application/json',
    }
  }
  
  console.log(config) // I see both photo and meta in the formData
  fetch("http://localhost:5001/upload", config)
    .then((responseData) =&gt; {
      console.log('awesome, we did it');
    })
    .catch(err =&gt; {
      console.log(err);
    });
  }
  </code></pre>
  
  <p><strong>Server: Nodejs + multer + s3</strong></p>
  
  <pre><code>const express = require('express');
  const bodyParser = require('body-parser');
  const multer = require('multer');
  multerS3 = require('multer-s3');
  
  var AWS = require('aws-sdk');
  var fs =  require('fs');
  
  var s3 = new AWS.S3();
  var myBucket = 'my-bucket';
  var myKey = 'jpeg';
  
  var upload = multer({
    storage: multerS3({
      s3: s3,
      bucket: myBucket,
      key: function (req, file, cb) {
        console.log(file);
        cb(null, file.originalname);
      }
    })
  });
  
  const app = express();
  app.use(bodyParser.json());
  app.use(bodyParser.urlencoded({
      extended: false
  }));
  
  app.post('/upload', upload.array('photo', 1), (request, response, next) =&gt; {
    // The upload to s3 works fine
    console.log(request.body); // I cannot see anything in the body, I only see { meta: '' }
    response.send('uploaded!')
  });
  
  exports.app = functions.https.onRequest(app);
  </code></pre>