-
-
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.
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: plone/plone.formwidget.namedfile#66 Depends on: - plone/plone.namedfile#158 - plone/plone.formwidget.namedfile#67
- Loading branch information
Showing
4 changed files
with
17 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