服务器端删除文件失败后出现dropzone.js默认消息

时间:2019-12-28 11:25:42

标签: dropzone.js

我想自定义“ dropzone.js”的删除文件方法,但是在调用服务器端后,如果发生错误,它仍然显示默认消息。看来我的文件已从this.files数组中删除。

            removedfile : function (file) {
                $.post($elm.data('remove-url'), p)
                    .done(function (rep) {
                        console.log(allFiles.length);
                        if (rep.Success) {
                            var _ref;
                            return (_ref = file.previewElement) !== null ? 
                           _ref.parentNode.removeChild(file.previewElement) : void 0;
                        }
                        else {
                            //file should not be removed in client side
                            //but default messsage show up
                            showNotif(notifyType.danger, rep.Message);
                           return void 0;
                        }
                    })
                    .fail(function (e) {
                        return void 0;
                    });

            };

0 个答案:

没有答案
相关问题