there is an error downloading pdf files in batches using download module. In the process of downloading, it always stops when downloading more than 20 or 40 files
var arr = [{
url: "http://pdf.dfcfw.com/pdf/H2_AN201803271111860450_1.pdf",
name: "6015002017"
},
{
url: "http://pdf.dfcfw.com/pdf/H2_AN201803281112695091_1.pdf",
name: "6015552017"
}]
Promise.all(arr.map(x => download(x.url, "dist",{filename:x.name+".pdf"}))).then(() => {
console.log("files downloaded!");
}).catch((error)=>{
console.log(error)
})
the error is as follows
is there any good way to solve this problem?