Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/faxes/fax-downloader

Download files from URLs with file-dl
https://github.com/faxes/fax-downloader

Last synced: 8 days ago
JSON representation

Download files from URLs with file-dl

Awesome Lists containing this project

README

        

# File Downloader

Download files from URLs and save to a defined location. Downloading file just got that little easier.

### Params
- url *(required)* - The file/image URL
- dest *(required)* - The destination from the node process location to save the file too.

### Options (Object)
Other options can include those within HTTP.request - https://nodejs.org/api/http.html#httprequestoptions-callback

### Example Usage

```js
let options = {
url: `http://your.domain`,
dest: `/save/location`,
}
faxDl.getFile(options.url, options.dest, /*{other: options}*/).then(function(fileResult) {
/*
fileResult = {
dest: `/save/location`,
status: 200,
error: `error`,
}
*/
});
```

### License
Under the [MIT license](https://github.com/FAXES/filedl/blob/main/LICENSE.md)