Improved upload messages
This commit is contained in:
parent
502f01ae6c
commit
761da1e936
@ -120,6 +120,9 @@ upload.start = {
|
||||
.html('Failed')
|
||||
.addClass('error')
|
||||
|
||||
// Throw error
|
||||
if (error===true) lychee.error('Upload failed. Server returned an error!', xhr, xhr.responseText)
|
||||
|
||||
} else if (xhr.responseText.substr(0, 8)==='Warning:') {
|
||||
|
||||
errorText = xhr.responseText.substr(8)
|
||||
@ -130,6 +133,9 @@ upload.start = {
|
||||
.html('Skipped')
|
||||
.addClass('warning')
|
||||
|
||||
// Throw error
|
||||
if (error===true) lychee.error('Upload failed. Server returned a warning!', xhr, xhr.responseText)
|
||||
|
||||
} else {
|
||||
|
||||
errorText = 'Server returned an unknown response. Please take a look at the console of your browser for further details.'
|
||||
@ -140,15 +146,15 @@ upload.start = {
|
||||
.html('Failed')
|
||||
.addClass('error')
|
||||
|
||||
// Throw error
|
||||
if (error===true) lychee.error('Upload failed. Server returned an unkown error!', xhr, xhr.responseText)
|
||||
|
||||
}
|
||||
|
||||
$('.basicModal .rows .row:nth-child(' + (file.num + 1) + ') p.notice')
|
||||
.html(errorText)
|
||||
.show()
|
||||
|
||||
// Throw error
|
||||
if (error===true) lychee.error('Upload failed. Server returned the status code ' + xhr.status + '!', xhr, xhr.responseText)
|
||||
|
||||
}
|
||||
|
||||
// Check if there are file which are not finished
|
||||
|
Loading…
Reference in New Issue
Block a user