download
download copied to clipboard
GotError [RequestError]: connect ETIMEOUT error to donwload pdf files
I am downloading pdf files from online ulrs using download module in node.js. But When I download pdf files, that error is showed. How to fix this error?
I used my code like this. pdfArr.forEach(async (url) => { await download(url, pdfDir) .then(() => { console.log(pdfArr.length, index); if (index === pdfArr.length - 1) { return res.status(200).json({ success: true, data: index }); } index++; }); });
error:
GotError [RequestError]: connect ETIMEDOUT 170.131.2.12:80
at ClientRequest.