Upload large files [jQuery+PHP]

Zaka

Programmer
Feb 9, 2012
471
121
Hi guys,
So basically I've been trying to understand file uploading as good as possible since I like to learn new stuff all the time. Now when it comes to uploading files in PHP we have this big issue, large files.

Default is 2MB in PHP, easy enough, you can just change the max_file_size and post_max_size in php.ini but that isn't a solid solution. Also the request takes so long. For that I created the upload form using jQuery with a progressbar, worked just fine.

Still this is not solving the problem with limitations, so I tried a new method, connecting through FTP and sending the file that way. This worked just fine and it was quick, up until 300MB.

I've read about chunked uploading, slicing the file down to bytes sending multiple files instead. This also allows for pausing an upload or retry from where you lost the connection instead of starting all over again.

Now my problem is, I don't understand how this really works when it comes to writing it in code. Sure there are plenty of plugins such as plupload or fileUploader, but thats not the point, I want to understand how it all works.

Is there anyone here who actually understands how it all works and who could help me understand it? Preferably with code exemples from both client and server side.

EDIT: I have been doing a lot of googling for a couple of months now but still can't find anything solid.
 

Users who are viewing this thread

Top