title: Form Upload File to a Web API that Requires a Custom Header
body: <p>I have a standard HTML form that asks the user for a file to upload.</p>
  
  <pre><code>&lt;form id="uploadForm" action="http://localhost:5000/api/collection/csv" method="post" enctype="multipart/form-data" &gt;
    &lt;div class="form-group"&gt;
      &lt;div class="col-md-10"&gt;
        &lt;p&gt;Upload one or more files using this form:&lt;/p&gt;
        &lt;input type="file" name="files" multiple /&gt;                       
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>This alone would work fine, however the API requires an Authorization Header that looks something like this:</p>
  
  <pre><code>Authorization: Bearer eyJhb.......
  </code></pre>
  
  <p>The web API is an ASP.Net Web API that is expecting the header, the content type <code>multipart/form-data</code>, and to have proper <code>webkit- boundary</code> as part of the POST submission.</p>
  
  <p>I've searched online and it seems there's no way to add a custom header to a form submission. Is there another way to upload this file properly with the custom header?</p>