-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #199 from plone/allowed_content_types--4.3.x
Add support for accept attribute on file input (4.3.x branch)
- Loading branch information
Showing
4 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Add support for the "accept" attribute on file inputs. | ||
|
||
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: https://github.com/plone/plone.formwidget.namedfile/issues/66 | ||
Depends on: | ||
- https://github.com/plone/plone.namedfile/pull/158 | ||
- https://github.com/plone/plone.formwidget.namedfile/pull/67 | ||
[thet] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters