0.3.1 • Published 2 years ago

@mborne/dl v0.3.1

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

node-dl

Node.js CI Coverage Status

Description

Download file from a given sourceUrl to a targetPath.

Note that :

  • It relies on wget to simplify FTP downloads
  • A temp file {targetPath}.part is created while downloading to handle download interuptions

Usage

const download = require('@mborne/dl');

download({
    sourceUrl: 'https://github.com/mborne.keys',
    targetPath: '/tmp/mborne.keys'
}).then(function(targetPath){
    console.log(targetPath);
}).catch(function(err){
    console.log(err.message);
});

Options

NameRequired?DescriptionDefault
sourceUrlYESSource URL (http, https, ftp)NA
targetPathYESInput encoding (UTF-8, LATIN1,...)NA
downloadIfExistsNODownload file if targetPath exists?true
unsafeSslNODisable certificate checkingfalse

License

MIT

0.3.0

2 years ago

0.3.1

2 years ago

0.2.1

3 years ago

0.2.0

5 years ago

0.1.0

5 years ago