title: Simple Dropzone implementation in ASP.Net MVC - How can I get data in the Controller?
body: <p>I am trying to implement Dropzone.js in ASP.Net MVC. I tried everything but somehow I cannot receive the dropped file in the controller. The variable is just NULL. </p>
  
  <p>My View looks like this:</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>    &lt;h2&gt;DropZoneUp&lt;/h2&gt;
      &lt;form action='@Url.Action("DropZoneUpload")'class="dropzone"id="my-awesome-dropzone"&gt;
      &lt;/form&gt;
      
      &lt;script src="~/Scripts/dropzone.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>My Controller looks like this:</p>
  
  <pre><code>[HttpPost]
  public ActionResult DropZoneUpload(IEnumerable&lt;HttpPostedFileBase&gt; files)
  {
      foreach (var file in files)
      {
          string filePath = Guid.NewGuid() + Path.GetExtension(file.FileName);
          file.SaveAs(Path.Combine(Server.MapPath("~/ExcelNDropUpload"), filePath));
      }
      return Json("fileupload successfully");
  }
  </code></pre>
  
  <p>The Controller actually gets called from the View. But the "IEnumerable files" are Null. 
  Does anybody have an idea what I am doing wrong?</p>
  
  <p>Thanks in advance!</p>
  
  <p>best regards
  BeardyBear</p>