Skip to content

Commit

Permalink
[fc] Repository: plone.formwidget.namedfile
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2024-03-15T12:23:27+01:00
Author: Johannes Raggam (thet) <[email protected]>
Commit: plone/plone.formwidget.namedfile@49d47c6

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
[thet]

Files changed:
A news/67.feature
M plone/formwidget/namedfile/file_input.pt
M plone/formwidget/namedfile/image_input.pt
M plone/formwidget/namedfile/widget.py
M plone/formwidget/namedfile/widget.rst
M setup.py
Repository: plone.formwidget.namedfile

Branch: refs/heads/master
Date: 2024-03-15T12:23:27+01:00
Author: Johannes Raggam (thet) <[email protected]>
Commit: plone/plone.formwidget.namedfile@57815fe

file input: Show accepted media types.

Files changed:
M plone/formwidget/namedfile/file_input.pt
M plone/formwidget/namedfile/image_input.pt
M plone/formwidget/namedfile/widget.rst
Repository: plone.formwidget.namedfile

Branch: refs/heads/master
Date: 2024-03-15T13:46:12+01:00
Author: Johannes Raggam (thet) <[email protected]>
Commit: plone/plone.formwidget.namedfile@462d8f1

Merge pull request #67 from plone/allowed_content_types

Add support for accept attribute on file input.

Files changed:
A news/67.feature
M plone/formwidget/namedfile/file_input.pt
M plone/formwidget/namedfile/image_input.pt
M plone/formwidget/namedfile/widget.py
M plone/formwidget/namedfile/widget.rst
M setup.py
  • Loading branch information
thet committed Mar 15, 2024
1 parent 63bb775 commit 27e5a55
Showing 1 changed file with 42 additions and 50 deletions.
Loading

0 comments on commit 27e5a55

Please sign in to comment.