问题
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