Ahmed Gamal
Ahmed Gamal

Reputation: 96

Laravel upload Large images

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 ?

Upvotes: 3

Views: 5770

Answers (2)

Mohammed Omer
Mohammed Omer

Reputation: 1236

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.

Upvotes: 2

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

Upvotes: 4

Related Questions