title: How to send multiple files with post request a API in Angular 4
body: <p>I want to append multiple files to API, it works for me to send just one file . 
  I catch the all files and console.log(array) gives me the all files but I couldn't send all files to API, it just sends one file. </p>
  
  <p>My HTML component </p>
  
  <pre><code>&lt;input type="file" name="howeworkfile[]"  ngModel 
  #howeworkfile="ngModel" multiple="multiple"  
  (change)="getFile($event)" 
  &gt;
  </code></pre>
  
  <p>My component TS</p>
  
  <pre><code>getFile(event) {
  let fileList: FileList = event.target.files;
  if (fileList.length &gt; 0) {
    console.log(fileList);
    let file: File = fileList[0];
    let formData: FormData = new FormData();
    formData.append('howeworkfile[]', file);
   formData.append('class_id', 7);
   formData.append('subject_id', 1);
   formData.append('school_id', 77);
   formData.append('name', 'sd');
   formData.append('description', 'sgerhgdf');
   formData.append('score', '2');
   formData.append('weight', 200);
   formData.append('type', 12);
   formData.append('deadline', '2018-02-13');
      this._http.post(this.url, formData)
    .subscribe(respo =&gt; {
      console.log(respo);
      // console.log(data.file);
    }, (err: HttpErrorResponse) =&gt; {
      console.log(err);
    });
   }
  }}
  </code></pre>