0.2.0 • Published 2 years ago

node-file-downloader v0.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

node-file-downloader

Install

npm install node-file-downloader --save

Usage

const download = require("node-file-downloader")

// Example of downloading music in mp3 type
download("https://wvv.33rapfr.com/wp-content/uploads/2021/01/01-Intro-9.mp3", "music.mp3", function () { 
    console.log('Music well installed'); 
}); 

// Example of downloading image in jpg type
download("https://i.imgur.com/d2vfF5Ob.jpg", "image.jpg", function () { 
    console.log('Image install well');
});

// Example of downloading video in mp4 type
download("https://i.imgur.com/GseGL59.mp4", "video.mp4", function () { 
    console.log('Video install well');
});

API

download(url, filename, callback(err))

url string of the file URL to download

filename string for the name of the file to be saved as

callback function to run after