Skip to content

Commit

Permalink
简单的错误提示
Browse files Browse the repository at this point in the history
  • Loading branch information
nwind committed May 9, 2016
1 parent 2fafe07 commit b8b92af
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ui/dialog/image/image.ctrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,12 @@ angular.module('kityminderEditor')
var fd = new FormData();
xhr.open("POST", url, true);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4 && xhr.status == 200) {
$scope.data.url = xhr.responseText;
if (xhr.readyState == 4) {
if (xhr.status == 200) {
$scope.data.url = xhr.responseText;
} else {
alert(xhr.responseText);
}
}
};
fd.append("upload_file", file);
Expand Down

0 comments on commit b8b92af

Please sign in to comment.