Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
29 Sep 2026

Pull Request resolves #46267 .

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

The FileField currently displays the maximum upload size calculated from the PHP post_max_size and upload_max_filesize settings, but provides no way for an extension to specify a lower, field-specific upload limit.

This change adds support for a maxsize attribute to the FileField while still respecting the limits imposed by the PHP configuration.

For example:

<field
    name="file"
    type="file"
    maxsize="20M"
/>

The displayed limit will be the lower of the field's maxsize value and the PHP upload limits.

Testing Instructions

Add a field to an existing form for example

<field
    name="file"
    type="file"
    maxsize="20M"
/>

Open the form containing the file field.

Verify that the displayed maximum upload size is 20 MB.

Try again with a size greater than the php max upload size - verify that the diplayed maximum is now the php size and not the size from tyhe field definition

Actual result BEFORE applying this Pull Request

The FileField always displays the maximum upload size calculated from the PHP configuration.

Expected result AFTER applying this Pull Request

A FileField can specify an extension-specific maximum upload size using the maxsize attribute.

The displayed maximum is the lowest of:

  • The maxsize value specified by the field, when present.
  • PHP post_max_size.
  • PHP upload_max_filesize.

Existing FileField definitions without a maxsize attribute continue to use the existing PHP-derived limit.

image

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar brianteeman brianteeman - open - 29 Sep 2026
avatar brianteeman brianteeman - change - 29 Sep 2026
Status New ⇒ Pending
avatar joomla-cms-bot joomla-cms-bot - change - 29 Sep 2026
Category ⇒ Layout Libraries Unit Tests
avatar brianteeman brianteeman - change - 29 Sep 2026
Title
…
[6.3] maxsize for extensions
[6.3] file upload maxsize
avatar brianteeman brianteeman - edited - 29 Sep 2026
avatar brianteeman brianteeman - change - 29 Sep 2026
The description was changed
avatar brianteeman brianteeman - edited - 29 Sep 2026
avatar obuisard obuisard - test_item - 2 Oct 2026 - Tested successfully
avatar obuisard
obuisard - comment - 2 Oct 2026

I have tested this item ✅ successfully on f91b587

Works as expected.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48522.

avatar obuisard
obuisard - comment - 2 Oct 2026

I have tested this item ✅ successfully on f91b587

Works as expected.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48522.

Add a Comment

Login with GitHub to post a comment