IsaacBen's avatar

Help with file configuration

So my website allows users to upload how many images they want, it's one image at a time. What values should I put in the php.ini? do I need to change something in the nginx as well? For now this is what I have:

upload_max_filesize = 40G post_max_size = 5M -> each image can't be larger than that

0 likes
2 replies
dertechniker's avatar
Level 2

post_max_size = 5M checks if the whole post request is no bigger than 5M ... so if there is other stuff submitted than the image itself, your request will fail if the image is 5M or even a little less.

Why is upload_max_filesize set to 40G? You should set this one to 5M. This checks if the submitted image is not bigger than 5M.

http://laravel.com/docs/5.1/validation

You can also check the filesize with laravel, as well as use the "image" validator.

Please or to participate in this conversation.