Extends: EventEmitter
Save files downloaded from the web
Params
none
Create instance of class Download
Params
- url
string- The url of the file to be downloaded - fileName
string- The name of the file to save to (without extension).
Download file from url and save to fileName
Returns: Promise | string - The name of the saved file
- csvFile
string- Name of the csv file - destDir
string- Destination directory - options
Object- .urlColumn
string- The column name in csvFile containing the url - .filenameColumns
Array.<string>- Array of column names in the csvFile to be used as part of the name of the output file - [.format]
Object= {headers: true, delimiter: ";", rowDelimiter: "\r\n", quoteColumns: true}- Format of the csv file - .year
integer- Year, used as part of the name of the output file - [.concurrency]
integer= 1- Number of concurrent downloads
- .urlColumn
Download files mentioned in csvFile and save them in destDir
- The url of the downloaded file
- Error message