Konubinix' opinionated web of thoughts

Download Multiple Files With JavaScript and Anchor Element

Fleeting

Download Multiple Files with JavaScript and Anchor Element

download files with JavaScript, simply create an anchor element, set href and download attributes, and click the element.

https://hyunbinseo.medium.com/download-multiple-files-with-javascript-and-anchor-element-20f89f500ab2

called over 10 times in Google Chrome, only 10 files are downloaded. The function itself is called over 10 times — it’s just that Chrome limits simultaneous download requests.

https://hyunbinseo.medium.com/download-multiple-files-with-javascript-and-anchor-element-20f89f500ab2

Add delays between each downloadFileWithAnchor call. Setting timeouts by index * 200ms worked even on large files that which are over 500MB each

https://hyunbinseo.medium.com/download-multiple-files-with-javascript-and-anchor-element-20f89f500ab2