I am trying to get a multiple upload library working for my Codeigniter based website. I have it working almost but I have a slight problem if I upload more than one image,
I was able to get multiple file uploads to work with clux's method but I had to modify the upload class slightly (I'm using Codeigniter 2). First I created a duplicate of the CI upload class into my applications library.
Line 143:
public function do_upload($field = 'userfile')
change to
public function do_upload($field = 'userfile', $i = 0)
And between lines 160 and 200, you must add [$i] to the end of the $_FILES variables.
Example:
is_uploaded_file($_FILES[$field]['tmp_name'])
change to:
is_uploaded_file($_FILES[$field]['tmp_name'][$i])
I believe there is a total of 9 of them.