How to increase the upload limit for files on a Sy

2019-02-17 07:55发布

I have a form in Symfony where the user uploads files to. These files can be up to 50Mb in size.

However, when I try to upload a file that is about 10Mb (before this, the files were no bigger than 7.2Mb) the form reloads with this error:

The uploaded file was too large. Please try to upload a smaller file

This is a validation error, it doesn't appear as a proper Symfony2 error.

I've set the upload_max_filesize setting in the PHP.ini file to 50MB, so a 10MB file shouldn't be an issue?

1条回答
孤傲高冷的网名
2楼-- · 2019-02-17 08:17

You need to set both of these in the php.ini:

post_max_size = 50M

upload_max_filesize = 50M
查看更多
登录 后发表回答