Direct-to-S3 / Azure tus 1.0 resume IndexedDB Golden Retriever 30 locales Webcam & screen capture

Filter on Select

Intercept file selection and apply custom filters before files are added to the queue.

What you should see: a rule the built-in validators do not cover, applied in onSelect: files are inspected and can be dropped before they ever reach the queue.
var uploader = CoreUpload.create('#filter-uploader', {
 uploadUrl: '/api/upload/upload',
 multiple: true,
 autoUpload: true,
 // onSelect receives the WHOLE selection; the array you return replaces it.
 onSelect: function(files) {
 return files.filter(function (file) {
 // Reject files larger than 5MB
 if (file.size > 5 * 1024 * 1024) {
 alert(file.name + ' is too large (max 5MB)');
 return false; // prevent file from being added
 }
 // Reject non-image files
 if (!/\.(jpg|jpeg|png|gif)$/i.test(file.name)) {
 alert(file.name + ' is not an image');
 return false;
 }
 return true; // accept the file
 });
 }
});

Screening the batch

The select callback hands you the files before they enter the queue, so you can drop ones that should not be there rather than rejecting them one at a time with an error each.

Filtering silently is only sometimes right

Removing files without saying so is fine when their absence is obvious — ignoring .DS_Store from a folder drop. Anything the user deliberately chose deserves a message: a file that vanishes without explanation is indistinguishable from a control that failed.