Welcome Guest, Not a member yet? Register   Sign In
Multiple file upload error
#1

[eluser]EEssam[/eluser]
Hi,

The following code (http://ellislab.com/forums/viewthread/66017/) is not working for me:

Code:
function upload_images()
    {
        $config['upload_path'] = './system/application/uploads/images/';
        $config['allowed_types'] = 'gif|jpg|png';
        $config['max_size'] = '2048';
        $config['max_width'] = '0';
        $config['max_height'] = '0';

        $this->load->library('upload', $config);

        $keys = array_keys($_FILES);
        $errors = array();
        $uploads = array();

        foreach ($keys as $field)
        {
            if (!$this->upload->do_upload($field))
            {
                $errors[] = $this->upload->display_errors();
            }
            else
            {
                $uploads = $this->upload->data();
            }
        }
    }

And I have the following in my view:

<?php echo form_upload('myimages[]') ?>
<?php echo form_upload('myimages[]') ?>
<?php echo form_upload('myimages[]') ?>
<?php echo form_upload('myimages[]') ?>

- The error message: You did not select a file to upload.
- I'm using form_open_multipart

Please help, what's wrong?

Thanks.


Messages In This Thread
Multiple file upload error - by El Forum - 09-02-2008, 01:36 PM
Multiple file upload error - by El Forum - 09-03-2008, 07:25 AM
Multiple file upload error - by El Forum - 09-03-2008, 11:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB