Socket
Socket
Sign inDemoInstall

node-file-downloader

Package Overview
Dependencies
48
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-file-downloader

One downloader for all file types for NodeJS


Version published
Weekly downloads
0
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 13 Jun 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc