Tried applying below code after opening Chrome in terminal with allow-file-access-from-files (did latter because without was hitting an origin 'null' CORS security prob) but still no luck uploading local mac folder of images (.jpg) to a website (below quoted error message).
Any help with where I'm going wrong would be greatly appreciated. I'm very new to this - the webpage is just my .txt file.
i_stack
var folder = "imgFolder/";
$(document).ready(function(){
$.ajax({
url : folder,
success: function (data) {
$(data).find("a").attr("href", function (i, val) {
if(val.match(/\.(jpe?g|png|gif)$/)) {
$("body").append( "<img src="+ folder + val +">" );
}
});
}
});
Cannot read property 'match' of undefined.
Index of LOCATION
– i_stack Jan 29 '19 at 04:49