1
0
mirror of https://gitee.com/bookshelfplus/bookshelfplus synced 2025-09-15 21:01:40 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

管理员后台文件上传添加出错提示

This commit is contained in:
2022-04-28 23:05:37 +08:00
parent bf37e0bfad
commit eb1ad3b838

View File

@@ -452,6 +452,9 @@
}, 300); }, 300);
}; };
xhr.onerror = function (e) { xhr.onerror = function (e) {
swal("上传失败,请检查网络连接并重试!").then(function () {
location.reload();
});
console.log('上传出错', xhr.status, xhr.statusText); console.log('上传出错', xhr.status, xhr.statusText);
}; };
xhr.send(file); // file 是要上传的文件对象 xhr.send(file); // file 是要上传的文件对象