title: How can I upload multiple files one at a time?
body: <p>I am using the input type='file' multiple  element, but do to server side restrictions I can only upload one document at a time.  So I am struggling to find a way to do this, while keeping just the single file input element... I think my only options are to create multiple forms with their own hidden file input elements and as I loop through the files somehow set the value of the hidden input field, but I'm not sure how.  Any reccomendations? Here is what I have so far:</p>
  
  <pre><code>HTML:
  &lt;form method='POST' id='frmUploadDoc' enctype='multipart/form-data' target='hiddenIframe' action='/wle/rest'&gt;
      &lt;input type="file" name="data" multiple="multiple" id="filesInput"&gt;
      &lt;input type="submit" value="Submit"/&gt;
  &lt;/form&gt;
  &lt;iframe name="hiddenIframe" id="hiddenIframe" style="display: none;"&gt;
  
  JAVASCRIPT:
  function handleFileSelect(evt) {      
      var files = evt.target.files; // FileList is a FileList of File objects.  
      var output = [];
      var actionText;
      for (var iCount = 0, f; f = files[iCount]; iCount++) {
         actionText="/wle/rest?action=addDocument&amp;name=" + iCount   //This creates the unique action URL for each individual form  
         $("#frmUploadDoc").attr("action", actionText);
         output.push("&lt;li&gt;&lt;strong&gt;", f.name, "&lt;/strong&gt;&lt;/li&gt;");
         postDocumentToWLE(iCount);            
      }
      document.getElementById('listDocs').innerHTML = '&lt;ul&gt;' + output.join('') + '&lt;/ul&gt;';
    }
  </code></pre>