title: File Upload Angular2 via multipart/form-data, 400 Error
body: <p>I need to upload a file together with some meta info via multipart/form-data like this:</p>
  
  <pre><code>Header
  ----boundary
  Meta
  ----boundary
  File
  ----boundary
  </code></pre>
  
  <p>For some reason I always get a <em>400 Error</em>, the Backend server tells me, that the <em>Meta</em>-Field is missing. However, if I look into the Hex/Ascii dump with Wireshark, the field is definitely there.<br>
  The following Curl-command works perfectly fine and the file gets uploaded successfully:  </p>
  
  <pre><code>curl -H "Expect:" -v -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: "token" -F "File=@/location" -F 'Meta={"access":"token"}' http://path
  </code></pre>
  
  <p>Therefore this doesn't seem to be a Backend failure. My Angular (4.1.3) request must be bad, but I can't figure out what's wrong with it.</p>
  
  <p><strong>Template-Code:</strong></p>
  
  <pre><code>&lt;input #file_input type="file" (change)="onFileInputChange($event)" multiple&gt;
  </code></pre>
  
  <p><strong>Angular2-Code:</strong><br>
  </p>
  
  <pre><code>onFileInputChange(event) {
    let fileList: FileList = event.target.files;
    for (let i = 0; i &lt; fileList.length; i++) {
      let fp: File = fileList[i];
      let formData: FormData = new FormData();
      formData.append('File', fp, fp.name);
      const body = JSON.stringify({
         'access': "token"
      });
      this.formData.append('Meta', body);
      let RequestHeader = new Headers();
      // auto set content type
      RequestHeader.append('Content-Type', '');
      RequestHeader.append('Accept', 'application/json');
      RequestHeader.append('Authorization', "token");
  
      this.http.post(this.backend_url, formData, RequestHeader).map(
      res =&gt; res.json()).subscribe(
              data =&gt; console.log('success'),
              error =&gt; console.log(error))
    }
  }
  </code></pre>
  
  <p>What am I missing here?</p>