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 Use appropriate formfields when auto-scaffolding files #618

Merged

Conversation

GuySartorelli
Copy link
Member

Copy link
Member

@emteknetnz emteknetnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, works well, except that if I have a relation that is an Image::class, the auto-scaffolded upload field allows me to select regular files like PDFs which aren't images. Applies to has_one, has_many and many_many relations.

@GuySartorelli
Copy link
Member Author

When attempting to upload a PDF, it gives an error "Extension 'pdf' is not allowed"
image

This is the pre-existing behaviour for has_one auto-scaffolded upload fields.

@emteknetnz
Copy link
Member

Weird, I must have mis-tested this, unable to replicate my issue

@emteknetnz emteknetnz merged commit 94c3089 into silverstripe:3 Jul 2, 2024
9 checks passed
@emteknetnz emteknetnz deleted the pulls/3/scaffolded-fields branch July 2, 2024 05:01
GuySartorelli added a commit to creative-commoners/silverstripe-assets that referenced this pull request Jul 17, 2024
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.

2 participants