0

I am uploading a file In Laravel. If I upload a file of 2 MB then it is working, but If I upload a file of 10 MB it is not working. If I check php.ini it shows max_post_size 1024 MB and max_file_upload 1024 MB.

It is working fine on local. I am using centos and nginx server.

Saveen
  • 4,120
  • 14
  • 38
  • 41

2 Answers2

0

Probably you should change your php configuration file to allow receipt of bigger files. See the accepted answer to the question "Change the maximum upload file size"

Update: "By default, Nginx has a limit of 1MB on file uploads. To set file upload size, you can use the client_max_body_size directive, which is part of Nginx’s ngx_http_core_module module. This directive can be set in the http, server or location context."

For details see https://www.tecmint.com/limit-file-upload-size-in-nginx/

Community
  • 1
  • 1
Prisacari Dmitrii
  • 1,985
  • 1
  • 23
  • 33
  • I have made changes the same. If I print phpnfo then t shows max_file_upload 1024 MB and max_post_size 1024 MB. After Updating this I have also restarted server – Krushna Bate May 25 '19 at 14:19
0

Do you after changing max_post_size and max_file_upload restart nginx service?

Maybe in error log you saw the answer:

/var/log/nginx/nginx_error.log
xayer
  • 413
  • 4
  • 11