Laravel upload Large images

自闭症网瘾萝莉.ら 提交于 2019-12-24 00:59:14

问题


I am trying to upload large images to server (binary file upload) via postman, it works fine for files sized 2 MB and below, however for files > 2 MB the upload fails

I set php.ini

upload_max_filesize = 100M post_max_size = 100M

and

nginx /etc/nginx/nginx.conf

client_body_buffer_size 100M; client_max_body_size 100M;

but it doesn't work

I tried plupload package for chunk upload but it also doesn't work for files > 2 MB

Any ideas how to upload large images in laravel ?


回答1:


It's doen't work because you set the wrong php.ini file do this on laravel dd(phpinfo()) and look the right php.ini use by laravel in the value

Loaded Configuration File




回答2:


may be I am a bit late for you , but for sake of everyone else , you may consider using this package

Resumablejs

it split file into chunks and upload each one, and if one failed , it will retry until all parts is completely uploaded.



来源:https://stackoverflow.com/questions/37736506/laravel-upload-large-images

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!