如何防止Fine-Uploader上的错误警报?

时间:2013-06-13 20:21:32

标签: javascript fine-uploader

有没有办法阻止onError回调被触发的警报?

我只需要捕获错误并以不同的方式显示它

1 个答案:

答案 0 :(得分:5)

是的,只需覆盖showMessage option

例如:

var uploader = new qq.FineUploader({
    request: {
        endpoint: 'my/endpoint'
    },
    callbacks: {
        onError: function(fileId, filename, reason, maybeXhr) {
            //do something with the error
        }
    },
    showMessage: function(message) {
        //either include an empty body, or some other code to display (error) messages
    }
});