ryanswrt/autoform-slingshot

accept only allowedFileTypes

gsuess opened this issue · 1 comments

Nice Package!

It would be nice if you would restrict the selectable file-types by what the directive allows:

fileTypes = Slingshot.getRestriction(directiveName)?.allowedFileTypes
fileTypes = [fileTypes] if _.isString fileTypes

return fileTypes.join "," if _.isArray fileTypes
<input type="file" accept=fileTypes name="......"/>

Good idea! Will have a go at it when I have some free time.