Problem/Motivation
The file.default_max_filesize that can be set in the element settings form can be configured to be higher than the PHP max upload limit. If this is the case then the description of the file upload widget will show incorrect information about the size of files that can be uploaded.
Steps to reproduce
Edit php.ini to set an 8 MB file upload limit: upload_max_filesize = 8M.
Go to /admin/structure/webform/config/elements
Set Default maximum file upload size to a value that is higher than the PHP max upload limit (e.g. 200 TB).
Now go to a form that has a file element. The help text shows "One file only. 200 TB limit." while the actual limit is 8 MB.
Proposed resolution
We could set up a max value in the settings form that matches the PHP limit, but that would not solve the root of the problem, since the PHP limit can change at any time.
The best solution would be to take the PHP limit into account when determining the limit to show in the help text.
Issue fork webform-3482402
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
pfrenssenBlocked by #3481554: Make tests pass.
Comment #4
pfrenssenComment #7
jrockowitz commentedTested and looks good.