Closed JoaoKunha closed 12 years ago
Support for HTML5 filters is a browser issue. All Plupload can do (and does) is pass along the filter information, and it's up to the browser to modify the file dialog.
Recent versions of Chrom{e,ium} display "Custom Files" in the filter (ignoring your title) and actually do filter the selection.
Even if the browser-launched file dialog doesn't filter the selectable files, if you listen for plupload.Uploader 'Error' events (using uploader.bind('Error', function(up, error) {...}), you'll find that you will get callbacks when the user selects a file that doesn't meet your criteria -- switch on error.code and check against plupload.FILE_SIZE_ERROR, plupload.FILE_EXTENSION_ERROR, etc.
Hi
I've been trying to have the "filters" working on HTML5 runtime but it seems to be working only for flash runtime! Tried also in the online examples and I have the same behaviour there. Using Firefox 14.0.1.
The settings I'm using: runtimes: 'html5,flash', max_file_size: '50mb', chunk_size: '1mb', multiple_queues:true, filters : [ {title : "Image files", extensions : "jpg,jpeg,gif,png"}, {title : "Document files", extensions : "pdf,doc,docx,xls,xlsx,ppt,pptx"} ] ...