title: DropZone.js Uploading multiples files using ASP.Net MVC
body: <p>I'm using a javascript library <a href="http://www.dropzonejs.com/" rel="nofollow">DropZone.js</a> but uploading multiples files is somehow not working with ASP.Net MVC.</p>
  
  <p>The one that works is when I set the Dropzone option "autoProcessQueue: true" and the MVC Controller argument name "inputFiles" can see the input files does successfully uploads to server. However, this means the uploading of images happens automatically and users has no chance to click the forms submit button. (I think that is why they call it DROPZone - auto uploads)</p>
  
  <p>Anyways, I wanted to let users click the submit button before any uploads happens so I set the option "autoProcessQueue: false", but on form submit the argument name "inputFiles" at Controller always returns null. </p>
  
  <pre><code>        &lt;form action="/home" method="post" enctype="multipart/form-data" class="dropzone dz-clickable form-horizontal form-bordered" id="dropzoneForm"&gt;
              &lt;div class="form-group form-actions"&gt;
                  &lt;div class="col-md-9 col-md-offset-4"&gt;
                      &lt;button type="submit" class="btn btn-sm btn-primary"&gt;&lt;i class="fa fa-floppy-o"&gt;&lt;/i&gt; Upload&lt;/button&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/form&gt;
  
  &lt;script&gt;
      $(function () {
          Dropzone.options.dropzoneForm = {
              paramName: "inputFiles", // The name that will be used to transfer the file
              autoProcessQueue: true,
              uploadMultiple: false,
              parallelUploads: 100,
              accept: function (file, done) {
                  done();
              }
          };
      });
  &lt;/script&gt;
  
  
  
  [HttpPost]
      public ActionResult Index(IEnumerable&lt;HttpPostedFileBase&gt; inputFiles)
      {
          string fName = "";
  
          foreach (HttpPostedFileBase fileName in inputFiles)
          {
              HttpPostedFileBase file = fileName;
              //Save file content goes here
              fName = file.FileName;
              if (file != null &amp;&amp; file.ContentLength &gt; 0)
              {
  
                  var originalDirectory = new DirectoryInfo(string.Format("{0}Images\\WallImages", Server.MapPath(@"\")));
  
                  string pathString = System.IO.Path.Combine(originalDirectory.ToString(), "imagepath");
  
                  var fileName1 = Path.GetFileName(file.FileName);
  
                  bool isExists = System.IO.Directory.Exists(pathString);
  
                  if (!isExists)
                      System.IO.Directory.CreateDirectory(pathString);
  
                  var path = string.Format("{0}\\{1}", pathString, file.FileName);
                  file.SaveAs(path);
              }
  
          } 
  
          return View();
      }
  </code></pre>
  
  <p>Any one tried using DropZone.js?</p>