import Downloader from 'downloader-with-progress';
let url = 'http://cachefly.cachefly.net/100mb.test';
let dl = new Downloader(url);
dl.onProgress((percent, loaded, total) => {
console.log('percent: ' + percent, 'loaded: ' + loaded, 'total: ' + total);
})
.onChangeState((state) => {
console.log('state', state);
})
.onFinish((blobUrl) => {
console.log('finshed', blobUrl)
dl.save('filename.ext'); // Save File
})
.start();
// OR
dl.abort();
-
Notifications
You must be signed in to change notification settings - Fork 0
mohammad128/javascript-download-file-with-progress
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
JavaScript download file with progress
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published