Programmatic
Add files to the uploader programmatically via the addFiles API method, without using the file dialog.
Drag & drop files here
<button id="addBtn">Add a Generated File</button> <div id="myUploader" class="mu-uploader">...</div>
var uploader = new MultipleUpload(document.getElementById('myUploader'), {
uploadUrl: '/api/upload',
autoUpload: false
});
document.getElementById('addBtn').addEventListener('click', function() {
// Create a file from a Blob
var blob = new Blob(['Hello, MultipleUpload!'], { type: 'text/plain' });
var file = new File([blob], 'generated-' + Date.now() + '.txt', { type: 'text/plain' });
uploader.addFiles([file]);
});