CharlesW's avatar

Advice on solutions for very large file uploads

Hello,

I've spent too much time today trying to support very large file uploads to S3. By "very large", I mean high-quality video sources — a GB file would not be unusual.

I have a Dropzone.js-based solution that works for very small files, but as far as I can tell I'm going to have to move to a solution that supports chunked transfers in order to support very large files.

On the browser side, Plupload and jQuery-File-Upload look promising. On the Laravel side, all I see is laravel-plupload.

Does anyone have experience with these, or alternatives that they like? I'd love to hear any thoughts before I dive back into this tomorrow.

— Charles

0 likes
6 replies
christopher's avatar

Plupload looks very promising. I also used Dropzone, but for large files its not the best solution.

@milon It has nothing to do with the server side max_upload value or something like that. It`s just because the Browsers cant upload large Files so the Files has to be chunked into a few smaller packages which are then uploaded to the server.

AliBayat's avatar

it seems a bit late to reply .. since this question was asked over 6 years ago.. but i'll reply anyway

this is how i fixed the issue..

as much as you increase certain configuration in php (upload_max_filesize, post_max_size, max_execution_time, ...) you might still get errors..

the solution is to send huge files to server in chunks. on the client side Resumable.js is working just fine and has lots of options and on the server side, you need some mechanism to merge the chunked files you just uploaded. clean the temp folder, and move the file to the specified disk if needed. (including S3 disks)

here are the links to libraries you can use:

https://github.com/pionl/laravel-chunk-upload (laravel package, sadly it support up to laravel 8 at the time i am writing this)

https://github.com/23/resumable.js

good luck

1 like

Please or to participate in this conversation.