remoteload
simple library to load array of urls into a local temporary folder.
installation
npm install remoteload
or clone the repository :)
usage
inclusion
const remoteload = ;
load resources
remoteload ;
the loadURls method returns a promise which will receive the temporary folder as argument.
load resource data
remoteload ;
the loadURLsData method returns a promise which will receive an array of buffer objects refering to the data retrieved from the requested urls.
load options
options are valid for both loadURLs and loadURLsData method.
- onProgress function : function being call each time a progress can be reported
- maxChunkSize number : number of files to try to load simultaneously, set to 0 or lower to disable
remoteload ##### cleanup```javascriptremoteload .cleanup() .then(() => console.log("All loaded folders cleaned up!"));
the cleanup method returns a promise.