title: The Parameter Doesn't Retrieve the Value of Uploaded File
body: <p>Goal:<br>
  I would like to have the second input name "file2" to be uploaded automatically to the actionresult with support of the jquery code.</p>
  
  <p>Problem:<br>
  It doesn't work because HttpPostedFileBase file2 is null. it is supposed to be contain any value based on uploaded file with support of jquery.</p>
  
  <p>Info:<br>
  There is a purpose why I'm asking about this unusual approach.</p>
  
  <p>Thank you!</p>
  
  <pre><code>public ActionResult UploadShipments(HttpPostedFileBase file, HttpPostedFileBase file2)
  {
  
  
  ---
  }
  </code></pre>
  
  <hr>
  
  <pre><code>&lt;input name="file" type="file" accept=".xml, .txt" /&gt;
  
  &lt;input name="file2" type="file" accept=".xml, .txt" hidden /&gt;
  </code></pre>
  
  <hr>
  
  <pre><code>$("#file1id").change(function (){
    if($('#file2id').length){
       $('#file2id').remove();
    }
    $(this).clone().attr('id', 'file2id').attr('type', 'hidden').insertAfter($(this));
  });
  </code></pre>
  
  <p><a href="https://jsfiddle.net/ayd4x079/" rel="nofollow">https://jsfiddle.net/ayd4x079/</a></p>