hi
create array of promises to the function u want to download in series then:
let promisesArray=[];
downloadinSeries(promisesArray).then(() => {}).catch((error) => { console.log(error); });
downloadinSeries(arr) {
return arr.reduce(function (promise, item) {
return promise.then(function (result) {
return item();
});
}, Promise.resolve([]));
}