title: CodeIgniter - uploading multiple files with one input
body: <p>I'm trying to upload <strong>several files</strong> at once from <strong>ONE input</strong>:</p>
  
  <p><code>&lt;input type="file" name="form-image[]" id="form-image" multiple="true"  /&gt;</code></p>
  
  <p>Which itself without <strong><a href="http://codeigniter.com/" rel="nofollow">CodeIgniter</a></strong> works fine. In my attempt to do the same thing with CodeIgniters file helper; I get an error (<a href="http://grab.by/cv3K" rel="nofollow">is_uploaded_file() <em>expects parameter 1 to be string, array given</a></em>), which indicates that I am doing something wrong, or CodeIgniter simply <strong>doesn't support multiple files?</strong></p>
  
  <p>My faulty code so far:</p>
  
  <pre><code>//Iterate through each file uploaded
  for ($i = 0; isset($_FILES['form-image']['name'][$i]); $i++) {
  
     //Fix the settings
     $config['upload_path'] = "./static/vimmel/";
     $config['file_name'] = time() . rand(1,988);
     $config['allowed_types'] = 'gif|jpg|png';
     $config['max_size']  = '1024';
     $config['max_width']  = '1024';
     $config['max_height']  = '768';
     $this-&gt;load-&gt;library('upload', $config);
  
     //Do the upload
     $this-&gt;upload-&gt;do_upload("form-image")
  }
  </code></pre>
  
  <p><em>Please note that I did edit out all error handling and such. Also note that I do not use the <code>is_uploaded_file()</code> function.</em></p>
  
  <p>Appreciating all help and suggestions. Thanks.</p>