for (var i = 0; i < imgData.imgSrc.length; i++)
{
var imageOne = {
camera:[imgData.camera[i]],
copyright:[imgData.copyright[i]],
date:[imgData.date[i]],
imgSrc:[imgData.imgSrc[i]],
imgTitle:[imgData.imgTitle[i]],
latitude:[imgData.latitude[i]],
longitude:[imgData.longitude[i]],
size:[imgData.size[i]]
};
jQuery.ajax({
type: "POST",
url: "/Map/AddDataImage/",
cache: false,
data: {image_data: imageOne,
image_data_from_sites: $.makeArray(uploadedImgFromUrl), 'item_id':data.item_id},
//async: false,
dataType: 'json',
success: function (data) {
//bootbox.confirm('Thank you! The attraction will appear on the website after reviewing by our team.', function () {
//});
}
});
}
function sendByOne(imgData, i) {
var imageOne = {
camera:[imgData.camera[i]],
copyright:[imgData.copyright[i]],
date:[imgData.date[i]],
imgSrc:[imgData.imgSrc[i]],
imgTitle:[imgData.imgTitle[i]],
latitude:[imgData.latitude[i]],
longitude:[imgData.longitude[i]],
size:[imgData.size[i]]
};
jQuery.ajax({
type: "POST",
url: "/Map/AddDataImage/",
cache: false,
data: {image_data: imageOne,
image_data_from_sites: $.makeArray(uploadedImgFromUrl), 'item_id':data.item_id},
//async: false,
dataType: 'json',
success: function (data) {
//bootbox.confirm('Thank you! The attraction will appear on the website after reviewing by our team.', function () {
//});
i++;
if (i < imgData.imgSrc.length) {
sendByOne(imgData, i);
}
}
});
}
sendByOne(imgData, 0);