lilo's avatar
Level 2

How to upload large file in laravel 8

Hi,

I have a dropzone area in my panel and I set the size of the file that can be uploaded as 500 MB. Then I set post_max_size and upload_max_filesize in php.ini. But I can't upload a file which is more than 20 MB. It never fills up. I prefer to use local as storage disk. Is there a way to fix this?

Thanks in advance.

0 likes
8 replies
vincent15000's avatar

Hello @lilo, what version of PHP do you use ? Is it on a web hosting or on your local web server ?

vincent15000's avatar

I had the same problem : I configured the php.ini file and it didn't work. I have solve this modifying another php.ini file specific to the 7.4.1 version.

Tell me if it helps.

lilo's avatar
Level 2

I will try it right after i find it @vincent15000 ,Where do you find your other php.ini file? I use xampp.

vincent15000's avatar

On Ubuntu distribution, in the /etc/php/7.4/cli or /etc/php/7.4/fpm folder according you use fpm or not.

trin's avatar

open phpinfo and look, from where php.ini loaded. but, as I already said, most likely the problem is in the webserver settings

trin's avatar

it is webserver limits. if u use nginx, u need set client_max_body_size 600M; for example. remember, body size not are file size.

Mash Square's avatar

This should be fixed with chunk uploading / multipart uploading and not by screwing around with the pho.ini file...but this is easier said than done, I am still looking for a way to do this as none of the solutions I saw so far work...😶

Please or to participate in this conversation.