FileReader icon indicating copy to clipboard operation
FileReader copied to clipboard

Accept attribute doesn't accept multiple values or wildcards

Open kylemacfarlane opened this issue 11 years ago • 0 comments

First of all, you can't supply a custom accept value option to fileReader() because like 48 is wrong (https://github.com/Jahdrien/FileReader/blob/master/jquery.FileReader.js#L48). Obviously the final value should be options.accept and not options.multiple.

In my HTML I have an attribute like accept="image/*,application/zip" which means any image or zip files. However this polyfill only seems to be able to handle simple values like accept="image/jpeg" and it doesn't support multiple mimetypes or wildcard mimetypes.

A fix for multiple mimetypes should be easy but maybe there's no easy way to do wildcards in actionscript? I thought that maybe instead I could just supply file extensions like fileReader({accept: '*.jpg, *.jpeg, *.png, *.gif, *.zip') and they'd make it to FileFilter in actionscript but that's not the case.

kylemacfarlane avatar Aug 03 '12 20:08 kylemacfarlane