📜  允许以编程方式在 dropzone 上出错时重新上传文件 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:08.177000             🧑  作者: Mango

代码示例1
view.dropzone = new Dropzone(form[0], {
    ...
    autoProcessQueue: false,
    uploadMultiple: false,
    parallelUploads: 100,
    maxFiles: 1,
    thumbnailWidth: 300,
    thumbnailHeight: null,
    previewsContainer: inputPreview[0],
    clickable: inputClick[0],
    acceptedFiles: 'image/*',
    ...
    error: function(file, errorMessage, xhr) {

        // Trigger an error on submit
        view.onSubmitComplete({
            file: file,
            xhr: xhr
        });

        // Allow file to be reuploaded !
        file.status = Dropzone.QUEUED;
        // this.cancelUpload(file);
        // this.disable();
        // this.uploadFile(file);

    }
});