有没有办法阻止onError
回调被触发的警报?
我只需要捕获错误并以不同的方式显示它
答案 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
}
});