How to Upload Large Files Above 500Mb in PHP

How to upload large files above 500MB in PHP

Do you think if increasing upload size limit will solve the problem? what if uploading 2GB file, what's happening then? Do you take into consideration the memory usage of such a script?

Instead, what you need is chunked upload, see here : Handling plupload's chunked uploads on the server-side
and here : File uploads; How to utilize "chunking"?

Unable to upload files over 500MB while upload_max_filesize is set to 1G

So I solved this. Really really annoyingly. The problem was that I typed 1GB instead of 1G in php.ini. No error messages were given and it wasn't clear at all that it wasn't using 1 Gigabyte. But php.ini won't recognise things like 1KB, 1MB or 1GB you have to use without the B.

Lesson learned, alot of time wasted.

Very large uploads with PHP

How about a Java applet? That's how we had to do it at a company I previously worked for. I know applets suck, especially in this day and age with all our options available, but they really are the most versatile solution to desktop-like problems encountered in web development. Just something to consider.

How to upload large file 5MB in laravel 5

If you want to upload big files you should use streams. Here’s the code to do it:

$disk = Storage::disk('s3');
$disk->put($targetFile, fopen($sourceFile, 'r+'));

PHP will only require a few MB of RAM even if you upload a file of several GB.

Source: https://murze.be/2015/07/upload-large-files-to-s3-using-laravel-5/

See Lrvl5 doc for usage and config of Storage :
https://laravel.com/docs/5.0/filesystem



Related Topics



Leave a reply



Submit