Filters are not visible on HTML5 #614

JoaoKunha opened this Issue Aug 23, 2012 · 1 comment


None yet
2 participants


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',
filters : [
{title : "Image files", extensions : "jpg,jpeg,gif,png"},
{title : "Document files", extensions : "pdf,doc,docx,xls,xlsx,ppt,pptx"}

inghamc commented Aug 23, 2012

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.

JoaoKunha closed this Aug 24, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment