Http – Request send File via multipart/from-data

I am new at the multipart topic. I want to send a http-Request with Angular that submits a formData.

My Code so far:

 constructor(private http: HttpClient) { }

 sendData(fileToUpload:File, json:File) {
        formData.append('File', fileToUpload);
        formData.append('JSON', json);
        return this.http
          .post(url, formData, { headers: this.getHeaders() });
 }

  private getHeaders(): HttpHeaders {
      let headers = new HttpHeaders();
      headers     = headers.set('Content-Type', 'multipart/form-data');
      return headers;
  }

Is there something I miss or should this code work just fine?

Source: New feed
Source Url Http – Request send File via multipart/from-data