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

Allowed content types 2.x #68

Merged
merged 3 commits into from
Mar 15, 2024
Merged

Allowed content types 2.x #68

merged 3 commits into from
Mar 15, 2024

Conversation

thet
Copy link
Member

@thet thet commented Mar 15, 2024

No description provided.

If the widget's field - if there is one - has the "accept" attribute set (the
`NamedImage` field has `image/*` set by default) then this is rendered as an
`accept` attribute on the file input.

This would restrict the allowed file types before uploading while still being
checked on the server side.

Fixes: #66
Depends on: plone/plone.namedfile#158
[thet]
@mister-roboto
Copy link

@thet thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

@thet thet changed the base branch from master to 2.x March 15, 2024 11:31
@mauritsvanrees
Copy link
Sponsor Member

The pre-commit CI error can be ignored, we have no pre-commit config on this branch.

I am testing this together with plone/plone.namedfile#159 on Jenkins on Plone 5.2.

@mauritsvanrees
Copy link
Sponsor Member

There are two robot test failures on 2.7, but they seem unrelated. I merge the two PRs.

@mauritsvanrees mauritsvanrees merged commit 8c92528 into 2.x Mar 15, 2024
3 of 5 checks passed
@mauritsvanrees mauritsvanrees deleted the allowed_content_types--2.x branch March 15, 2024 16:12
@mauritsvanrees
Copy link
Sponsor Member

plone.namedfile 5.7.0 and plone.formwidget.namedfile 2.2.0 are out.

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.

None yet

3 participants