From da442b024c50160be58281975a6fabe2d86a61a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Mon, 7 Jan 2013 11:11:21 +0100 Subject: [PATCH] remove aborted uploads --- apps/files/js/files.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 91204f041e..6d19a341e9 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -351,6 +351,7 @@ $(document).ready(function() { } else { uploadtext.text(t('files', '{count} files uploading', {count: currentUploads})); } + delete uploadingFiles[dirName][fileName]; $('#notification').hide(); $('#notification').text(t('files', 'Upload cancelled.')); $('#notification').fadeIn(); @@ -376,6 +377,7 @@ $(document).ready(function() { } FileList.loadingDone(file.name, file.id); } else { + Files.cancelUpload(this.files[0].name); $('#notification').text(t('files', response.data.message)); $('#notification').fadeIn(); $('#fileList > tr').not('[data-mime]').fadeOut(); @@ -384,6 +386,7 @@ $(document).ready(function() { }) .error(function(jqXHR, textStatus, errorThrown) { if(errorThrown === 'abort') { + Files.cancelUpload(this.files[0].name); $('#notification').hide(); $('#notification').text(t('files', 'Upload cancelled.')); $('#notification').fadeIn();