title: Asp.Net Core - Not Able to Upload Files From Dropzone JS
body: <p>I am using asp.net core 2.2 with dropzone js.</p>
  
  <p>I am trying to submit a form along with the files contained in dropzone js.</p>
  
  <p>I have an input file field (can be hidden or not hidden). I want to assign dropzone files to this field and submit it. But the Forms field is always null.</p>
  
  <p>Here is the code:</p>
  
  <p>MVC Controller:</p>
  
  <pre><code>[HttpPost]
  [ValidateAntiForgeryToken]
  public IActionResult Add(ViewModels.Photo model)
  {
      var files = HttpContext.Request.Form.Files; // this is also empty
      ....
  }
  </code></pre>
  
  <p>MVC Model:</p>
  
  <pre><code>public class Photo
  {
      ...
  
      public List&lt;IFormFile&gt; Files { get; set; }
  }
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;form asp-action="Add" asp-controller="Photos" method="post" id="addForm" enctype="multipart/form-data"&gt;
      &lt;div class="dropzone"&gt;
          &lt;input asp-for="Files" type="file" multiple hidden/&gt;
      &lt;/div&gt;
      &lt;button type="submit"&gt;Submit&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>var e = "#addForm",
  var t = new Dropzone(e, {
      maxFilesize: 1,
      acceptedFiles: ".png,.jpg,.jpeg",
      uploadMultiple: false,
      autoProcessQueue: false
  });
  t.on("addedfile", function (o) {
      $("#Files").files = t.files;
  })
  </code></pre>