diff --git a/src/base/single/input/file.js b/src/base/single/input/file.js index ea5024e9b..9e80091fe 100644 --- a/src/base/single/input/file.js +++ b/src/base/single/input/file.js @@ -520,22 +520,21 @@ setTimeout(function () { self_.clean(); // remove files from list self_.hide(); // hide progress bars and enable input file - - if (200 > xhr.status || xhr.status > 399) { - BI.Msg.toast(BI.i18nText("BI-Upload_File_Error"), { level: "error" }); - self.fireEvent(BI.File.EVENT_ERROR); - return; - } - var error = BI.some(_wrap.attach_array, function (index, attach) { - if (attach.errorCode) { - BI.Msg.toast(BI.i18nText(attach.errorMsg), { level: "error" }); - self.fireEvent(BI.File.EVENT_ERROR, attach); - return true; - } - }); - !error && self.fireEvent(BI.File.EVENT_UPLOADED); // enable again the submit button/element - }, 1000); + }, 100); + if (200 > xhr.status || xhr.status > 399) { + BI.Msg.toast(BI.i18nText("BI-Upload_File_Error"), { level: "error" }); + self.fireEvent(BI.File.EVENT_ERROR); + return; + } + var error = BI.some(_wrap.attach_array, function (index, attach) { + if (attach.errorCode) { + BI.Msg.toast(BI.i18nText(attach.errorMsg), { level: "error" }); + self.fireEvent(BI.File.EVENT_ERROR, attach); + return true; + } + }); + !error && self.fireEvent(BI.File.EVENT_UPLOADED); }; _wrap.url = o.url; _wrap.fileType = o.accept; // 文件类型限制