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

Command icon 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

pfrenssen created an issue. See original summary.

pfrenssen’s picture

Status: Active » Postponed
pfrenssen’s picture

Status: Postponed » Needs review

jrockowitz made their first commit to this issue’s fork.

jrockowitz’s picture

Status: Needs review » Fixed

Tested and looks good.

  • liam morland committed f4a197c1 on 6.3.x
    Issue #3482402: Add spelling exception
    
    Fixes issue introduced in...

  • liam morland committed f4a197c1 on 6.x
    Issue #3482402: Add spelling exception
    
    Fixes issue introduced in...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.