Attach field type - Allowed file extensions

Can we configure the allowed file extensions for a field Attach ?
I’d like to limit to only .xml files.

this should be doable as a custom app.
hook to file - validate.
in the method check the filename.

Sure I can validate, but I want the file browser to default to *.xml instead of *.*

And I think this should be built in frappe, I’ll submit a feature request on github.