Closed nelhop closed 1 year ago
accept
prop works for file blueprint (for ex: /site/blueprints/files/svg.yml
) not for files
field:
https://getkirby.com/docs/reference/panel/fields/files#upload-options__restricting-uploads-to-certain-file-types
# /site/blueprints/pages/default.yml
fields:
image:
type: files
uploads: svg # refers to `/site/blueprints/files/svg.yml`
# /site/blueprints/files/svg.yml
accept:
mime: image/svg+xml
extension: svg
Thanks for clarifying @afbora!
So there is no way to restrict the file type which can be selected, only the one that is uploaded?
accept
prop in file blueprint to restrict file type in upload process.query
prop in files field to show specific file types:
https://getkirby.com/docs/reference/panel/fields/files#querying-files# /site/blueprints/pages/default.yml
fields:
image:
type: files
uploads: svg # refers to `/site/blueprints/files/svg.yml`
query: page.images.filterBy('extension', 'svg')
Description
The accept option to restrict file types is not working. All images can be selected.
Expected behavior
Only svg files should be possible to upload or select.
Kirby Version 3.9.1