上传文件后重新加载ajax代码dropzone.js

时间:2019-05-02 03:37:53

标签: javascript ajax dropzone

出于某种原因,浏览器会在上传所有文件之前重新加载。

如何确保仅在完成文件上传后重新加载。

 $.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!")

    }
});

0 个答案:

没有答案