0.0.1 • Published 4 years ago
@mnesia/dl-file v0.0.1
dl-file
Promise based HTTP file downloader
fetch(url, filename)
.then(filename => console.log(`Saved to ${filename}`));
With progress support
function progressFunc(progress) {
console.log(`Downloaded ${progress.downloadedBytes} of ${progress.totalSize}`);
}
const progressThrottle = 600;
fetch(url, filename, progressFunc, progressThrottle);
progressThrottle determines how often the progressFunc is called, default is 1000ms
0.0.1
4 years ago