
multi-download is a pure JavaScript library which allows the user to download and rename multiple files from the browser at once.
How to use it:
Install and import the multi-download library.
# NPM $ npm install multi-download --save
import multiDownload from 'multi-download';
Create a download button and specify the files paths in the data-files attribute.
<button id="download-rename-button"
data-files="1.zip 2.zip 3.zip">
Download multiple files and rename them
</button>The JavaScript to download multiple files once you click the download button.
// Vanilla JS
document.querySelector('#download-button').addEventListener('click', event => {
const files = event.target.dataset.files.split(' ');
multiDownload(files);
});
// With jQuery
$('#download-button').on('click', () => {
const files = $(this).data('files').split(' ');
multiDownload(files);
});
// With Blob
const unicorn = URL.createObjectURL(new Blob([blobData], {type: 'text/plain'}));
const goat = URL.createObjectURL(new Blob(['blobData'], {type: 'text/plain'}));
multiDownload([unicorn, goat]);Changelog:
v4.1.0 (09/10/2025)
- Add TypeScript definitions
v4.0.0 (10/18/2021)
- This package is now pure ESM.







