@@ -396,8 +396,14 @@ export const http = {
xhr.upload.addEventListener("progress", function(e) {
onProgress((e.loaded / e.total) * 100 + "%");
});
+ xhr.onabort = () => {
+ console.log('xhr aborted.');
+ }
return xhr;
},
+ // 覆盖全局配置的失败回调。因为无论是上传子集失败还是用户取消了上传,都不需要弹窗。
+ error: function() {
+ },
}),
"postForm",
url,