title: file count is always zero in web API when trying to upload a document with angular 2
body: <p>I'am trying to upload a file using a web API in C#. For that the code I have used in as follows. 
  httpRequest.Files.Count value always gets zero when i'm trying to upload a document.
  What am I doing wrong?</p>
  
  <p><strong>mcDocuments.ts file</strong></p>
  
  <pre><code>fileChange(event) {
    debugger;
    let fileList: FileList = event.target.files;
    if (fileList.length &gt; 0) {
      let file: File = fileList[0];
      let formData: FormData = new FormData();
      formData.append('uploadFile', file, file.name);
      let token = JSON.parse(Cookie.get('currentUser')).token
      let headers = new Headers();
      headers.append('Access-Control-Allow-Origin', '*');
  
      headers.append('Authorization', 'bearer ' + token);
  
      headers.append('UserName',
        JSON.parse(Cookie.get('currentUser')).username);
      headers.append('Content-Type', 'multipart/form-data');
  
      let options = new RequestOptions({ headers: headers });
      let apiUrl1 = "http://localhost:53732/api/UploadFileApi";
      this.http.post(apiUrl1, formData, options)
        .map(res =&gt; res.json())
        .catch(error =&gt; Observable.throw(error))
        .subscribe(
        data =&gt; console.log('success'),
        error =&gt; console.log(error)
        )
    }
    window.location.reload();
  }
  </code></pre>
  
  <p><strong>mcDocuments.html file</strong></p>
  
  <pre><code>  &lt;input type="file" id="btnUpload" value="Upload" (change)="fileChange($event)" class="upload" /&gt; 
  </code></pre>
  
  <p><strong>web Api</strong></p>
  
  <pre><code>  using System.Net.Http;
    using System.Web;
    using System.Web.Http;
    namespace FileUpload_WebAPI_Angular2.Controllers
    {
    public class UploadFileApiController : ApiController
    {
      [HttpPost]
      public HttpResponseMessage UploadJsonFile()
      {
          HttpResponseMessage response = new HttpResponseMessage();
          var httpRequest = HttpContext.Current.Request;
  
          if (httpRequest.Files.Count &gt; 0)
          {
              foreach (string file in httpRequest.Files)
              {
                  var postedFile = httpRequest.Files[file];
                  var filePath = 
                  HttpContext.Current.Server.MapPath("~/UploadFile/" + postedFile.FileName);
                  postedFile.SaveAs(filePath);
              }
             }
          return response;
         }
       }
     }
  </code></pre>
  
  <p><strong>module.ts file</strong></p>
  
  <pre><code>   declarations: [    McDocumentsComponent,],
     providers: [{ provide: LocationStrategy, useClass: HashLocationStrategy }],
     bootstrap: [McDocumentsComponent]
  </code></pre>