Old post, but just spent an hour looking for this info.
It looks like the docs are false here:
Especially this part:
Restricting uploads to certain file types
If you want to restrict what types of files can be uploaded to the given destination, assign a file template using the uploads property. In your file template, set the accept option. See the docs about file blueprints.
I spent ages trying to make the accept option work in a files blueprint, and indeed it works… when you are in the edit view for a specific file and not in the edit view for a page which uses that file as a field value.
So it looks like you have to put the accept option twice:
In the file blueprint (e.g. site/blueprints/files/image.yml).
Under the fields.{field_name}.uploads key in the page blueprint.
(I verified this by looking at the hidden <input type="file" accept="…"> generated in the DOM.)
I think my mistake was trying to use a template key for a type: filesfield, based on examples I was seeing in the Blueprint samples.
But double-checking now, it looks like those examples use type: filessections, not type: filesfields, which is hard to tell because it’s implicit (the sections key is not used).
So I did not use a correct field config like this:
type: files
label: Cover image
max: 1
uploads:
# this will use the "accept" config from
# blueprints/files/cover-image.yml
template: cover-image
Because I already had a template key one level higher, based on copy-pasted examples, which was ignored silently:
type: files
label: Cover image
max: 1
# this will NOT use the "accept" config from
# blueprints/images/cover-image.yml
template: cover-image
# so I had to redefine the same "accept" config here
uploads:
accept:
# …