silverstripe / silverstripe-asset-admin

Silverstripe assets gallery for asset management
BSD 3-Clause "New" or "Revised" License
19 stars 78 forks source link

ENH Let AssetAdmin default to Upload_Validator default upload limits #1430

Closed GuySartorelli closed 6 months ago

GuySartorelli commented 6 months ago

Description

This change is based on https://github.com/silverstripe/silverstripe-assets/pull/469#pullrequestreview-749727900 and aims to get the other work in a state it can be merged in

Manual testing steps

Set this configuration - it should be respected by asset admin when before it was not.

SilverStripe\Assets\Upload_Validator:
  default_max_file_size:
    '[image]': '500k'
    '*' : '1m'

Then set this configuration - the Upload_Validator configuration should still work in UploadField in forms but not in asset admin - asset admin should now allow up to 2MB uploads for all file types.

SilverStripe\AssetAdmin\Controller\AssetAdmin:
  max_upload_size: 2m

Issues

Pull request checklist