Min File Size
Enforce a minimum file size using the onSelect callback. This demo rejects files smaller than 1 KB.
Drag & drop files here (min 1 KB)
<div id="myUploader" class="mu-uploader">...</div> <div id="error"></div>
var uploader = new MultipleUpload(document.getElementById('myUploader'), {
uploadUrl: '/api/upload',
onSelect: function(file) {
if (file.size < 1024) {
document.getElementById('error').textContent =
file.name + ' is too small (min 1 KB).';
return false; // Reject the file
}
return true;
}
});