title: mvc upload file with model - second parameter posted file is null
body: <p>I have a simple model with 1 string property which I render on a simple view.</p>
  
  <p>the view looks like the following:</p>
  
  <pre><code>@using (Html.BeginForm("UploadFile", "Home", FormMethod.Post, new { encType="multipart/form-data" }))
  {
      @Html.TextBoxFor(m =&gt; m.FirstName)
      &lt;br /&gt;&lt;br /&gt;
  
      &lt;input type="file" name="fileUpload" /&gt;&lt;br /&gt;&lt;br /&gt;
      &lt;input type="submit" value="submit me" name="submitme" id="submitme" /&gt;
  }
  </code></pre>
  
  <p>Controller is this:</p>
  
  <pre><code>[HttpPost]
  public ActionResult UploadFile(UploadFileModel model, HttpPostedFileBase file)
  {
     // DO Stuff
     return View(model);
  }
  </code></pre>
  
  <p>Now, when I submit, the model DOES get populated but the second parameter being HttpPostedFileBase is null. However when doing Request.Files - it does seem to show there is a file in the Request being posted.
  How can I actually get the second parameter to bind? </p>