Multi Downloader is a pure JavaScript library that allows the user to download and rename multiple files from the browser at once.
download multiple files from url list, download multiple files at once, download multiple files from website, download all files from a website, download multiple files javascript
How to make use of it:
Install and import the multiple download library.
# NPM $ npm install multi-download --save
import multiDownload from 'multi-download';
Create a download button and specify file 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>
JavaScript to download multiple files by simply clicking 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]);
Download Mutiple Files From The Browser At Once, multi-download Plugin/Github, download multiple files as zip using javascript
See Demo And Download
Official Website(sindresorhus): Click Here
This superior jQuery/javascript plugin is developed by sindresorhus. For extra Advanced Usages, please go to the official website.
Be First to Comment