title: Not able to upload multiple files with IEnumerable<HttpPostedFileBase>
body: <p>I have scenario where the user selects 4 images to upload and I need to bind this four files to my model and save into the folder. but the problem I am facing is my model when reaches to action method it will be null.</p>
  <p>My View :</p>
  <pre><code>@using(@Html.BeginForm(&quot;fileUpload&quot;,&quot;Home&quot;,FormMethod.Post, new { enctype = &quot;multipart/form-data&quot;}))
  {
  &lt;div&gt;
      &lt;h1&gt;Auto Upload&lt;/h1&gt;
  &lt;/div&gt;
  &lt;div&gt;@Html.TextBoxFor(m =&gt; m.MyFile, new { id = &quot;file1&quot; , Type = &quot;file&quot; })&lt;/div&gt;
  &lt;div&gt;@Html.TextBoxFor(m =&gt; m.MyFile, new { id = &quot;file2&quot; , Type = &quot;file&quot; })&lt;/div&gt;
  &lt;div&gt;@Html.TextBoxFor(m =&gt; m.MyFile, new { id = &quot;file3&quot; , Type = &quot;file&quot; })&lt;/div&gt;
  &lt;div&gt;@Html.TextBoxFor(m =&gt; m.MyFile, new { id = &quot;file4&quot; , Type = &quot;file&quot; })&lt;/div&gt;
  &lt;input type =&quot;submit&quot; name =&quot;submit&quot; /&gt;
  }
  </code></pre>
  <p>My Model :</p>
  <pre><code>public class MyModel
      {
          public IEnumerable&lt;HttpPostedFileBase&gt; MyFile { get; set; }
      }
  </code></pre>
  <p>Controller : When I click on submit in my controller's fileUpload method I get files = null.</p>
  <pre><code>        [HttpPost]
          public void fileUpload(IEnumerable&lt;HttpPostedFileBase&gt; files)
          {
              string s = &quot;upload&quot;;
          }
  </code></pre>
  <p>I am very new to file upload things compared to my usual work.</p>