Hello!
quick question: is it possible to restrict the file-type which can be selected by the user in an asset field? Like: only jpg and png. Or only pdf…
Thanks!
Hello!
quick question: is it possible to restrict the file-type which can be selected by the user in an asset field? Like: only jpg and png. Or only pdf…
Thanks!
You can’t restrict, which files are selectable, but you can restrict the upload via config.yaml.
# define allowed file types for uploads (global)
assets.allowed_uploads: png, jpg, jpeg
# define allowed file types for uploads (for user groups)
groups:
author:
$admin: false
$vars:
assets.allowed_uploads: png, jpg, jpeg
Hi @nilsborg did you find a different solution?