Show error from server in upload-dialog

This commit is contained in:
Tobias Reich 2014-10-18 17:06:17 +02:00
parent 9698629c31
commit c0d2f4b5b8
2 changed files with 7 additions and 2 deletions

BIN
dist/main.js vendored

Binary file not shown.

View File

@ -110,7 +110,8 @@ upload = {
xhr.onload = function() {
var wait = false;
var wait = false,
errorText = "";
file.ready = true;
@ -128,8 +129,12 @@ upload = {
$(".upload_message .rows .row:nth-child(" + (file.num+1) + ") .status")
.html("Error")
.addClass("error");
if (xhr.responseText.substr(0, 6)==="Error:") errorText = xhr.responseText.substr(6) + " Please take a look at the console of your browser for further details.";
else errorText = "Server returned an unknown response. Please take a look at the console of your browser for further details.";
$(".upload_message .rows .row:nth-child(" + (file.num+1) + ") p.notice")
.html("Server returned an unknown response. Please take a look at the console of your browser for further details.")
.html(errorText)
.show();
// Set global error