Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] File Uploading Class
#1

[eluser]NordicElf[/eluser]
I'm fairly new to CI and I'm loving it! It's so simple and it just works. However...
I am having an issue with the File Uploading Class. From my local box on WAMP, the file upload is really slow. If the images are tiny it's super quick but anything over 500kb and it's really slow. Like a few minutes to upload. I left the config values to no limit. My php.ini has 32Mb limits and my 4mb photo is taking longer than 5mins and counting on localhost!

xss filtering is off.

snippet from controller:
Code:
$config['upload_path'] = './uploads/';
        $config['allowed_types'] = 'gif|jpg|png';
        $config['max_size'] = '0';
        $config['max_width'] = '0';
        $config['max_height'] = '0';
        $config['encrypt_name'] = TRUE;

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

        if (!$this->upload->do_upload()) {
            $data['error'] = array('error' => $this->upload->display_errors());
        ...
        }

It all works the files eventually upload but the speed is going to be a problem on a live server.



Any ideas?

EDIT:

I ended up using this : http://pixelcone.com/jquery/ajax-file-upload-script/ and it was so simple and easy to implement! I'd still love to know why using ajax fixes php's slow file upload deal but I'm happy. So glad I never put flash on my site - don't know what I was thinking!
Anyway, I hope this will be useful to someone out there. Especially if you want to do multiple file uploads.


Messages In This Thread
[SOLVED] File Uploading Class - by El Forum - 06-21-2012, 09:12 AM
[SOLVED] File Uploading Class - by El Forum - 06-23-2012, 08:00 AM



Theme © iAndrew 2016 - Forum software by © MyBB