Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH Let AssetAdmin default to Upload_Validator default upload limits #1430

Conversation

GuySartorelli
Copy link
Member

@GuySartorelli GuySartorelli commented Dec 21, 2023

Description

This change is based on silverstripe/silverstripe-assets#469 (review) 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

  • The target branch is correct
  • All commits are relevant to the purpose of the PR (e.g. no debug statements, unrelated refactoring, or arbitrary linting)
    • Small amounts of additional linting are usually okay, but if it makes it hard to concentrate on the relevant changes, ask for the unrelated changes to be reverted, and submitted as a separate PR.
  • The commit messages follow our commit message guidelines
  • The PR follows our contribution guidelines
  • Code changes follow our coding conventions
  • This change is covered with tests (or tests aren't necessary for this change)
  • Any relevant User Help/Developer documentation is updated; for impactful changes, information is added to the changelog for the intended release
  • CI is green

@GuySartorelli GuySartorelli force-pushed the pulls/2/asset-admin-use-validator-defaults branch from 330204f to 3339d90 Compare December 21, 2023 23:59
@emteknetnz emteknetnz merged commit a144ac1 into silverstripe:2 Jan 8, 2024
12 checks passed
@emteknetnz emteknetnz deleted the pulls/2/asset-admin-use-validator-defaults branch January 8, 2024 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants