From f1ce863ddab80bc3e5972d8afa8d7f2afc5aedb0 Mon Sep 17 00:00:00 2001 From: dailer Date: Mon, 1 Apr 2019 20:12:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20fix:=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=B8=8A=E4=BC=A0=E6=8E=A7=E4=BB=B6=E5=AF=B9http=20er?= =?UTF-8?q?ror=20=E7=9A=84=E5=A4=84=E7=90=86.(=E9=9B=86=E7=BE=A4=E4=B8=8Bn?= =?UTF-8?q?ginx=E9=99=90=E5=88=B6=E6=96=87=E4=BB=B6=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E5=AF=BC=E8=87=B4413=E9=94=99=E8=AF=AF,=E5=9B=A0=E4=B8=BA?= =?UTF-8?q?=E6=9C=AA=E5=81=9A=E5=A4=84=E7=90=86=E5=AF=BC=E8=87=B4=E8=A7=A6?= =?UTF-8?q?=E5=8F=91=E4=BA=86EVENT=5FUPLOAD)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/input/file.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/base/single/input/file.js b/src/base/single/input/file.js index c560f2d287..2697920a42 100644 --- a/src/base/single/input/file.js +++ b/src/base/single/input/file.js @@ -472,7 +472,11 @@ self_.clean(); // remove files from list 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); // enable again the submit button/element }, 1000);