Since the last Chrome update, my website has encountered an issue. The code snippet below, which was designed to download multiple files, is now only opening the last file in the same tab. I have ensured that my Chrome settings still allow for multiple downloads from my site.
Please advise me on how to resolve this issue.
for (i = 0; i < photosURL.length; i++) {
var downloadLink = document.createElement("a");
downloadLink.href = photosURL[i];
downloadLink.download = "foto_id_" + [i];
document.body.appendChild(downloadLink);
downloadLink.click();
document.body.removeChild(downloadLink);
}