File download queue with unique file names support
npm i queueue-download
const download = ;const files =remote: 'url://to/remote/file'local: '/localpath/to/file'remote: 'url://to/remote/file'local: '/localpath/to/file';const res = await ;
async download(files, opts);
Returns an array with results. It never throws an error, all errors are in the result array.
- force — force path creation
- concurrency — number of simultaneous downloads, 'auto' or undefined are equals to cpus number
Also you can add an
id field to the files, and it will be returned in the result.
Unique file names
You can use pattern in the local file name as described in the fsu module