title: Laravel 5.7 can't parse POST multipart/form-data request
body: <p>I use this code in Angular to send data to my <code>Laravel 5.7</code> API endpoint as a <code>multipart/form-data</code>:</p>
  
  <pre><code>sendImageFile(id: number, fileToUpload: File) {
    const formData: FormData = new FormData();
    formData.append('file', fileToUpload, fileToUpload.name);
    formData.append('photoalbum_id', id.toString() );
  
    this.headers.delete('Content-Type'); // remove default application/json setting
    this.headers.append('Content-Type', 'multipart/form-data');
  
    this.options = new RequestOptions({ headers: this.headers });
  
    return this.http.post(this.url, formData, this.options)
      .pipe(catchError(this.handleError));
  }
  </code></pre>
  
  <p>I checked the sent data with this code:</p>
  
  <pre><code>new Response(formData).text().then(console.log);
  </code></pre>
  
  <p>Get this result in console:</p>
  
  <pre><code>------WebKitFormBoundaryRjHGSmIZUd0iUMK9
  Content-Disposition: form-data; name="file"; filename="mice.jpg"
  Content-Type: image/jpeg
  
  here-is-some-blob-data
  
  ------WebKitFormBoundaryRjHGSmIZUd0iUMK9
  Content-Disposition: form-data; name="photoalbum_id"
  
  1
  </code></pre>
  
  <p>So it seems the datas (and the photoalbum_id field) has been sent.</p>
  
  <p>But the Laravel get back an Internal Server Error with this error message:</p>
  
  <pre><code>SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'photoalbum_id' cannot be null (SQL: insert into...
  </code></pre>
  
  <p>What do I wrong in this case? Why don't parse Laravel the form datas?</p>