Download a file node.js

Download a file node.js

download a file node.js

In this article we're gonna talk about how you can use NodeJs and download files like.csv,.pdf,.jpg and any type of file you need to download. A file downloader for NodeJs. Weekly Downloads. 267 Homepage. github.​com/ibrod83/nodejs-file-downloader. Generic file download utility.

Download a file node.js - opinion

npm

Install

npm install download-file --save

Usage

var download =require('download-file')
var url ="http://i.imgur.com/G9bDaPH.jpg"
    directory:"./images/cats/",
    filename:"cat.gif"
download(url, options,function(err){
console.log("meow")

API

download(url, [options], callback(err))

  • url string of the file URL to download

  • options object with options

    • directory string with path to directory where to save files (default: current working directory)
    • filename string for the name of the file to be saved as (default: filename in the url)
    • timeout integer of how long in ms to wait while downloading (default: 20000)
  • callback function to run after

Install

Weekly Downloads

Collaborators

Источник: [https://torrent-igruha.org/3551-portal.html]
download a file node.js

Download a file node.js

3 thoughts to “Download a file node.js”

Leave a Reply

Your email address will not be published. Required fields are marked *