Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poor support for upload_max_filesize #238

Closed
vrana opened this issue Dec 12, 2019 · 0 comments
Closed

Poor support for upload_max_filesize #238

vrana opened this issue Dec 12, 2019 · 0 comments

Comments

@vrana
Copy link
Member

vrana commented Dec 12, 2019

If the size of an uploaded file exceeds PHP's upload_max_filesize then the form field reports just a generic error not mentioning size at all. I suggest two improvements:

  1. If the size set in Form::MAX_FILE_SIZE exceeds upload_max_filesize then throw an exception.
  2. If the file upload fails with UPLOAD_ERR_INI_SIZE, report the same error as when exceeding Form::MAX_FILE_SIZE.

There are already some checks for post_max_size in the code, maybe something similar could be done for upload_max_filesize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant