My name is Tommy, I am the author of Publr. When I'm not working on Publr, I'm either working at One Lucky Guitar, playing in Metavari, or haning out with my girlfriend.
Code Igniter's Upload library is great, but doesn't allow you to upload multiple files. If you want to use the library, but need to do multiple file uploads, replace your /libraries/Upload.php file with this:
Upload.php
And here's how to do multiple uploads from your controller:
foreach ($_FILES["photo"]["error"] as $key => $error)
{
if($this->upload->do_upload("photo[$key]"))
{
$upload = $this->upload->data();
// do stuff with your upload data here...
}
else
{
$data['upload_errors'] = $this->upload->display_errors('', '
');
}
}
Note: This will not affect your ability to do single uploads like you normally could.