diff --git a/src/base/single/input/file.js b/src/base/single/input/file.js index c560f2d28..2697920a4 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);