Browse Source

无JIRA任务 fix:文件上传控件对http error 的处理.(集群下nginx限制文件大小导致413错误,因为未做处理导致触发了EVENT_UPLOAD)

es6
dailer 6 years ago
parent
commit
f1ce863dda
  1. 6
      src/base/single/input/file.js

6
src/base/single/input/file.js

@ -472,7 +472,11 @@
self_.clean(); // remove files from list self_.clean(); // remove files from list
self_.hide(); // hide progress bars and enable input file self_.hide(); // hide progress bars and enable input file
// BI.Msg.toast("onload"); 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;
}
self.fireEvent(BI.File.EVENT_UPLOADED); self.fireEvent(BI.File.EVENT_UPLOADED);
// enable again the submit button/element // enable again the submit button/element
}, 1000); }, 1000);

Loading…
Cancel
Save