title: Why image is not upload to server with react?
body: <p>I have to upload image with react to server but put request sent empty image object.</p>
  
  <p>This is function to set state for image</p>
  
  <pre><code>...
  fileUpload(event) {
      const companyState = {...this.state.company};
      companyState['image'] = event.target.files[0];
      this.setState({company: companyState});
  }
  ...
  </code></pre>
  
  <p>This is code to upload image</p>
  
  <pre><code>...
  &lt;input type="file" name="image" className="form-control"  accept="image/*" onChange={this.fileUpload}/&gt;
  ...
  </code></pre>
  
  <p>This service to send image and i have test it here i got image object with file but when i console requestOptions before
  fetch request it make image object empty</p>
  
  <pre><code>...
  function editCompany(id, companyData){
      const requestOptions = {
          method: 'PUT',
          headers: authHeader(),
          body: JSON.stringify(companyData)
      };
      return fetch(baseUrl+'company/'+id, requestOptions)
              .then(handleResponse)
              .then(company =&gt; {
                  return company;
              })
  }
  ...
  </code></pre>
  
  <p>This is my <strong>auth header</strong> function.</p>
  
  <pre><code>...
  export function authHeader() {
      // return authorization header with jwt token
      let AdminUser = JSON.parse(localStorage.getItem('admin-user'));
  
      if (AdminUser &amp;&amp; AdminUser.token) {
          return { 'Authorization': 'Bearer ' + AdminUser.token , 'Content-Type': 'application/json' };
      } else {
          return {};
      }
  }
  </code></pre>