Skip to content

Commit

Permalink
Display error when upload fails #51
Browse files Browse the repository at this point in the history
  • Loading branch information
match41 committed Mar 20, 2018
1 parent fa51ecb commit b32d003
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/static/hearty_rabbit.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,13 @@ function upload_file(file)
else
{
console.warn("Upload failure:", req.status);
alert("onload(): cannot upload file: " + req.statusText);
}
};
req.onerror = () =>
{
alert("onerror(): cannot upload file: " + req.statusText);
};
req.send(file);
show_lightbox("/loading.svg");
}
Expand Down

0 comments on commit b32d003

Please sign in to comment.