title: React-native upload image to amazons s3
body: <p>I want to upload images from my app to S3 server. I have all data and codes calculated (tested using curl on computer) but I can't figure out how to call 'fetch' correctly. I'm getting response: </p>
  
  <p>'At least one of the pre-conditions you specified did not hold. Condition: Bucket POST must be of the enclosure-type-multipart/form-data'</p>
  
  <p>How can I recreate form-data in react-natives fetch? There is no FormData to which I can append and then send it like in fetches example.</p>
  
  <p>EDIT:
  Thanks @philipp-von-weitershausen, greate that you have added this feature. However I have some troubles calling it. I'm getting "Unsupported BodyInit type". Found that is because in fetch.js: "support.formData" returns false. What am I missing when I call fetch? </p>
  
  <p>My code example: </p>
  
  <pre><code> var form = new FormData();
   form.append("FormData", true)
   form.append("name", this.state.invoiceNumber)
   form.append("key", this.state.invoiceNumber)
   form.append("Content-Type", "image/png")
   form.append('file', this.props.uri)
   //alert(FormData.prototype.isPrototypeOf(form))
  
    fetch(amazon_url,{body: form,mode: "FormData", method: "post", headers: {"Content-Type": "multipart/FormData"}})
            .then((response) =&gt; response.json())
            .catch((error) =&gt; {
               alert("ERROR " + error)
            })
            .then((responseData) =&gt; {
               alert("Succes "+ responseData)
            })
            .done();
  </code></pre>