出于某种原因,浏览器会在上传所有文件之前重新加载。
如何确保仅在完成文件上传后重新加载。
$.ajax({
contentType: 'application/json; charset=utf-8',
dataType: 'json',
type: 'POST',
url: "/Journal/SaveTransactions",
data: transactions,
success: function (result) {//converted result to array to get journalID and message result.Data.nameofvariable
//alert(result.Data.message); //message called from array result
// calls uploadfiles function from attachments controllers.
fileDropZone.options.url = "/Blob/UploadBlob?journalID=" + result.Data.journalID;
fileDropZone.processQueue();
location.reload();
},
error: function () {
alert("Error!")
}
});