Welcome Guest, Not a member yet? Register   Sign In
HTML5 Multi File Upload
#1

[eluser]Christoph Rumpel[/eluser]
Hi,

we got several similar issues here, but somehow i cannot find infos that could help me.
Ive written some simple php code to upload several images at once.
Code:
foreach ($_FILES["userfile"]["error"] as $key => $error) {
            if ($error == UPLOAD_ERR_OK) {
                $tmp_name = $_FILES["userfile"]["tmp_name"][$key];
                $name = $_FILES["userfile"]["name"][$key];
                move_uploaded_file($tmp_name, "$uploads_dir/$name");
            }
}

This is working fine. Now i tried to do this with the CI upload class. As far as i know, this class was not ment to work with multiple files.

Modified Upload Class

On this site, someone modified this class, so it works. Unfortunately this was coded for CI 1.7.2. I gues therefore it does not work for me, because it only uploads one file.

Has anyone went though the same issue and can help me? I love CI, but sometimes i go crazyw due to less infos and outdated functions.

Thx and greets




Theme © iAndrew 2016 - Forum software by © MyBB