title: get all files from multiple input
body: <p>What I want is to save all images from multiple inputs. But I am having a hard time of getting all images without using form submit. Am using ajax.</p>
  
  <p>This is my HTML for example</p>
  
  <pre><code>&lt;input type="file" id="image-1" name="item_file[]"&gt;
  &lt;input type="file" id="image-2" name="item_file[]"&gt;
  </code></pre>
  
  <p>And This is my ajax when submit</p>
  
  <pre><code>var file_data = $("#image")[0].files; 
  var form_data = new FormData();
  for(var i = 0; i &lt; file_data.length; i++) {
     form_data.append('item_file[]', file_data[i]);;
  }
  
   $.ajax({
      url: "upload.php",
      dataType: 'json',
      cache: false,
      contentType: false,
      processData: false,
      data: form_data,       
      type: 'POST'
   })
  </code></pre>
  
  <p>In my server side I only got 1.</p>