Upload size limit displayed on node add/edit form does not reflect per-role limit

Created on 29 April 2025, about 1 month ago

Problem/Motivation

The upload size limit displayed below a field on a node add/edit form shows the global limit (or the per-field "Maximum upload size" is this is set) - it does not reflect the per-role limit set using this module. Thus, if a per-role limit has been set, the limit shown to the user below the field before they attempt an upload is not the limit that is actually applied when the user tries to upload a file.

Steps to reproduce

  1. Set a per-role limit for role X for a field, which is lower than the global limit. X should be a role that has permission to create content for the relevant content type & field.
  2. Log in as a user with role X.
  3. Go to the node add form for the relevant content type.
  4. Note the size limit shown below the upload field.
  5. Attempt to upload a file which is larger than the per-role limit for the field but smaller than the global limit.

Observed behaviour: the limit actually applied is the per-role limit, which differs from the limit displayed in step 4.

Replicated on 1.0.1 and 1.0.2 .

Proposed resolution

If possible, display at step 4 the limit that will actually be applied.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom davej

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024