title: Upload a image with fetch
body: <p>I have a form defined:</p>
  
  <pre><code>&lt;form method="POST" onSubmit={this.handleSubmit.bind(this)} enctype="multipart/form-data"&gt;
  </code></pre>
  
  <p>The handler for the submit event is defined as such:</p>
  
  <pre><code>handleSubmit(event)
      {
          event.preventDefault();
          var FormData = require('form-data');
          var form = new FormData();
  
          form.append('nome', this.refs.name.value);
          form.append('phone', this.refs.phone.value);
          form.append('address', this.refs.address.value);
          form.append('mail', this.refs.mail.value);
          form.append('type', 'file');
          form.append('photo', this.refs.photo.value);
  
          const {dispatch} = this.props;
          dispatch(fetchByArray(form));
      } }
  </code></pre>
  
  <p>fetchByArray(form): </p>
  
  <pre><code>export function fetchByArray(form) {
      return function(dispatch) {
          return fetch(`http://my_domain/api`, {
              method: "POST", body: form })
              .then(response =&gt; response.json())
              .then(json =&gt; dispatch(receiveByQuerystring1(json)));
      } }
  </code></pre>
  
  <p>This works if all the parameters are strings but if I try to specify a file, I get an error as my api handler doesn't get the file.</p>
  
  <p>On the backend <code>$request-&gt;file('photo')</code> is empty. What could be my issue here?</p>