Accept Attribute Filter
Use the accept option to set the file input accept attribute for native OS-level filtering.
(function() {
new MultipleUpload('#demo', {
uploadUrl: '/api/upload',
multiple: true,
accept: '.jpg,.jpeg,.png,.gif,.webp'
});
})();
A filter on the picker, not a rule
accept is written straight through to the file input's accept attribute, so it decides what the operating system's dialog shows by default. It takes the same syntax the attribute does: extensions (.jpg,.png), MIME types (image/png), or wildcards (image/*).
It stops nothing
Every file dialog lets the user switch the filter back to “All files”, and drag and drop ignores the attribute completely. So accept is a convenience that saves scrolling, never a validation step. Use allowedExtensions or allowedMimeTypes for a rule the component enforces, and re-check on the server, which is the only place a determined caller cannot reach.
Set
allowedExtensions with no accept and the picker filter is derived from it automatically — the component falls back to allowedExtensions, then allowedMimeTypes. The dialog and the rule agree without you writing the list twice.