Allow the binary widget to select certain file types

Hi guys!

The idea is that you can configure the binary widget to select only certain file types.

maybe in the attributes of the xml:
field name = “my_binary_field” file_accept = “pdf”


file_accept = “jpg, png”

I think it is the proper place as it is more a experience improvement than a validation constraint.

I would simply use the attribute accept with the same syntax as the HTML input because Gtk as similar feature (but it will need to distinct also from pattern.

hi ced!
in html it would be accepted more direct and combinable, using these types:

in the xml of the view form it would be:
accept = “. pdf, .doc”
accept = “image / * ,. pdf”
accept = “. doc, .docx, application / msword, application / vnd.openxmlformats-officedocument.wordprocessingml.document”

and in gtk would you have to choose a single method internally? MIME type string?
a loop that checks the string