0

有什么方法可以防止onError触发回调的警报?

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

4

1 回答 1

6

是的,只需覆盖showMessage选项

例如:

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
    }
});
于 2013-06-13T20:33:40.287 回答