-
-
Notifications
You must be signed in to change notification settings - Fork 10
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: #66 Depends on: plone/plone.namedfile#158 [thet]
- Loading branch information
Showing
5 changed files
with
85 additions
and
4 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,12 @@ | ||
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 | ||
[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
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