title: Request.files is Empty in MVC file upload
body: <p>I have the same issue </p>
  
  <pre class="lang-html prettyprint-override"><code>@using (Html.BeginForm("CreateRequest", "SupportRequest", FormMethod.Post, new { id = "frmStemplate", enctype = "multipart/form-data" }))
  {
    &lt;td&gt;&lt;input type="file" name="FirstFile" id="FirstFile" class="button"  /&gt; 
    &lt;input  type="button" class="button" id="FirstFileupload"  value="upload" onclick="Javascript:DocumentUpload();"/&gt;
  }
  
  &lt;script language="javascript" type="text/javascript"&gt;
      function DocumentUpload()
      {
          var BrowseFile = $('#FirstFile').val();
  
          if (BrowseFile != null &amp;&amp; BrowseFile != "") {
              alert(BrowseFile);
              $.ajax({
                  type: 'POST',
                  dataType: 'json',
                  url: '@Url.Content("~/SupportRequest/UploadFiles")?fileElementId=' + BrowseFile,
                  success: function (data) {
                      alert('Hi'); //debugger;
                      if (data.Result == "SUCCESS") {
                          alert('Hi');
                      }
                      else {
                          ShowInfo('Document Uploaded Successfully');
                      }
                  }
              });
          }
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>On the controller side, I have: </p>
  
  <pre><code>[AcceptVerbs(HttpVerbs.Post)]
  public ActionResult UploadFiles(string fileElementId, FormCollection formColl)
  {
      var FirstFile = Request.Files;
      foreach (string upload in Request.Files)
      {
          if (!Request.Files[upload].HasFile()) continue;
          string path = AppDomain.CurrentDomain.BaseDirectory + "uploads/";
          string filename = Path.GetFileName(Request.Files[upload].FileName);
          Request.Files[upload].SaveAs(Path.Combine(path, filename));
      }
      return Json(new { Filename = "" });
  }
  </code></pre>
  
  <p>But my <code>Request.Files</code> is always <code>null</code>.</p>
  
  <p>I tried several things, like changing the code to <code>Request.Files["FirstFile"]</code>, etc. Each time, the file collection is empty.</p>