remove aborted uploads
This commit is contained in:
parent
cbb118d4a3
commit
da442b024c
|
@ -351,6 +351,7 @@ $(document).ready(function() {
|
||||||
} else {
|
} else {
|
||||||
uploadtext.text(t('files', '{count} files uploading', {count: currentUploads}));
|
uploadtext.text(t('files', '{count} files uploading', {count: currentUploads}));
|
||||||
}
|
}
|
||||||
|
delete uploadingFiles[dirName][fileName];
|
||||||
$('#notification').hide();
|
$('#notification').hide();
|
||||||
$('#notification').text(t('files', 'Upload cancelled.'));
|
$('#notification').text(t('files', 'Upload cancelled.'));
|
||||||
$('#notification').fadeIn();
|
$('#notification').fadeIn();
|
||||||
|
@ -376,6 +377,7 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
FileList.loadingDone(file.name, file.id);
|
FileList.loadingDone(file.name, file.id);
|
||||||
} else {
|
} else {
|
||||||
|
Files.cancelUpload(this.files[0].name);
|
||||||
$('#notification').text(t('files', response.data.message));
|
$('#notification').text(t('files', response.data.message));
|
||||||
$('#notification').fadeIn();
|
$('#notification').fadeIn();
|
||||||
$('#fileList > tr').not('[data-mime]').fadeOut();
|
$('#fileList > tr').not('[data-mime]').fadeOut();
|
||||||
|
@ -384,6 +386,7 @@ $(document).ready(function() {
|
||||||
})
|
})
|
||||||
.error(function(jqXHR, textStatus, errorThrown) {
|
.error(function(jqXHR, textStatus, errorThrown) {
|
||||||
if(errorThrown === 'abort') {
|
if(errorThrown === 'abort') {
|
||||||
|
Files.cancelUpload(this.files[0].name);
|
||||||
$('#notification').hide();
|
$('#notification').hide();
|
||||||
$('#notification').text(t('files', 'Upload cancelled.'));
|
$('#notification').text(t('files', 'Upload cancelled.'));
|
||||||
$('#notification').fadeIn();
|
$('#notification').fadeIn();
|
||||||
|
|
Loading…
Reference in New Issue