Last active
October 8, 2019 02:53
-
-
Save ronipl/97102d3f08a3dcb5527e78752074f1ee to your computer and use it in GitHub Desktop.
Download html images based on file source array.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var files = [ | |
"file.ext", | |
] | |
var i; | |
var targets_count = files.length; | |
for (i = 0; i < targets_count; i++) { | |
files[i] | |
var partsArr = files[i].split('/'); | |
console.log(partsArr); | |
var a = jQuery("<a>").attr("href", files[i]).attr("download", ""+partsArr[5]+"").appendTo("body")[0]; | |
a.click(); | |
a.remove(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment