dropzone-当发送空并且有验证错误时

时间:2018-11-21 15:24:25

标签: javascript jquery laravel dropzone

我已经搜索了太多次此问题,但一无所获 当我发送带有上传文件的dropzone时,这是我的dropzone(不为空) 我可以在this.on('error')this.on('success')中收到回复 这是我的空地:

Dropzone.options.articleForm = {
    uploadMultiple: true,
    autoProcessQueue: false,
    parallelUploads: 10000,
    acceptedFiles: ".jpeg,.jpg,.png,.gif,.mp4,.mkv,.avi",
    init: function () {
        let submitButton = document.querySelector("#subminButton");
        articleForm = this;
        $(submitButton).on('click', function (e) {

            if (articleForm.getQueuedFiles().length < 1) {
                articleForm.uploadFiles([]);

            } else {
                e.preventDefault();
                articleForm.processQueue();
            }
        });

        this.on('error', function (file, response) {
            debugger;
        });

        this.on("success", function (file) {
            debugger;

        });
        //--------------- when send with file send these data too ----
        this.on("sending", function (file, xhr, formData) {
            debugger;

        });
        //--------------- when send empty file send these data too ---
        this.on("sendingmultiple", function (data, xhr, formData) {
            debugger;

        });
    }
}

我的问题是在将dropzone发送为空并进行错误验证时,我在哪里可以看到响应?

0 个答案:

没有答案