title: Read the body of a Fetch Promise
body: <p>I have the following express endpoint for uploading to Google Cloud storage. It works great and the response from the google api gives me a unique file name that I want to pass back to my front end:</p>
  <pre><code>app.post('/upload', (req, res) =&gt; {
    var form = new formidable.IncomingForm(),
    files = [],
    fields = [];
  
    form
      .on('field', function(field, value) {
        fields.push([field, value]);
      })
      .on('file', function(field, file) {
        files.push([field, file]);
      })
      .on('end', function() {
        console.log('-&gt; upload done');
      });
    form.parse(req, function(err, fields, files){
      var filePath = files.file.path;
      bucket.upload(filePath, function(err, file, apiResponse){
        if (!err){
          res.writeHead(200, {'content-type': 'text/plain'});
          res.end(&quot;Unique File Name:&quot; + file.name);
        }else{
          res.writeHead(500);
          res.end();
        }
      });
    });
  
   return;
  });
  </code></pre>
  <p>I reach this endpoint by calling a short function which passes the file to it:</p>
  <pre><code>function upload(file) {
    var data = new FormData();
    data.append('file', file);
    return fetch(`upload`,{
      method: 'POST',
      body: data
    });
  }
  
  const Client = { upload };
  export default Client;
  </code></pre>
  <p>This function is called from my front end like this:</p>
  <pre><code>Client.upload(this.file).then((data) =&gt; {
    console.log(data);
  });
  </code></pre>
  <p>This final <code>console.log(data)</code> logs the response to the console. However, I don't see anywhere the response that I wrote in (<code>&quot;Unique File Name:&quot; + file.name</code>)</p>
  <p>How I can retrieve this info from the response body on the client-side?</p>
  <p>The <code>data</code> looks like this when I console.log it:</p>
  <p><a href="https://i.stack.imgur.com/0wl4a.png" rel="noreferrer"><img src="https://i.stack.imgur.com/0wl4a.png" alt="Screenshot of the data console.log" /></a></p>
  <p>This is the response I get when I POST a file to my endpoint using Postman:</p>
  <p><a href="https://i.stack.imgur.com/pEsyV.png" rel="noreferrer"><img src="https://i.stack.imgur.com/pEsyV.png" alt="Screen shot of response using Postman" /></a></p>