title: Invalid 'HttpContent' instance provided. It does not have a 'multipart' content-type header with a 'boundary' parameter
body: <p>I'm writing a web API that has a post method accepting files uploaded from UI.</p>
  <pre class="lang-cs prettyprint-override"><code>public async Task&lt;List&lt;string&gt;&gt; PostAsync()
  {
  
      if (Request.Content.IsMimeMultipartContent(&quot;form-data&quot;))
      {
          string uploadPath = HttpContext.Current.Server.MapPath(&quot;~/uploads&quot;);
  
          var streamProvider = new MyStreamProvider(uploadPath);
  
          await Request.Content.ReadAsMultipartAsync(streamProvider);
  
          return streamProvider.FileData
                  .Select(file =&gt; new FileInfo(file.LocalFileName))
                  .Select(fi =&gt; &quot;File uploaded as &quot; + fi.FullName + &quot; (&quot; + fi.Length + &quot; bytes)&quot;)
                  .ToList();
      }
      else
      {
          HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.BadRequest, &quot;Invalid Request!&quot;);
          
          throw new HttpResponseException(response);
      }
  }
  </code></pre>
  <p>Then I post a request for the above action by postman.
  I set the <code>content-type</code> header to <code>multipart/form-data</code>
  but an error occurred during the execution of action.
  here is the error message body :</p>
  <blockquote>
  <p>&quot;Invalid 'HttpContent' instance provided. It does not have a 'multipart' content-type header with a 'boundary' parameter.\r\nParameter name: content&quot;</p>
  </blockquote>
  <p>I went to the postman headers but I found that the request header content type was set to <code>application-json</code>.</p>
  <p><img src="https://i.stack.imgur.com/TYBLc.png" alt="Postman screenshot" /></p>