title: File Upload with Form data in asp.net core
body: <p>I am trying to upload files with form data from angular 1.5x to .net core web api controller.
  My controller looks like this</p>
  
  <pre><code>    [HttpPost]public async Task&lt;ObjectResult&gt; Create(TutorModel model) 
      {
      }
  </code></pre>
  
  <p>My post method is</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code> return $http.post("/api/Tutor/createTutor/",
        data,
                  {
                      withCredentials: false,
                      headers: { 'Content-Type': undefined },
                      transformRequest: angular.identity,
                      responseType: "arryabuffer"
                  });
  
  
  Where data is
  
  
  for (var i = 0; i &lt; vm.uploadedFiles.length ; i++) { //vm.upload contains list of file
                  data.append(vm.uploadedFiles[i].name, vm.uploadedFiles[i]);
              }
              data.append("tutor", tutor); //tutor is json object </code></pre>
  </div>
  </div>
  </p>
  
  <p>Now when it posts to controller, model contains no property value. I get uploaded files in controller if I watch Request.Form.Files.  What is the best method of sending model to post method above. Any pointer? Thanks </p>