]> source.dussan.org Git - nextcloud-server.git/commitdiff
remove aborted uploads
authorJörn Friedrich Dreyer <jfd@butonic.de>
Mon, 7 Jan 2013 10:11:21 +0000 (11:11 +0100)
committerJörn Friedrich Dreyer <jfd@butonic.de>
Mon, 7 Jan 2013 10:11:21 +0000 (11:11 +0100)
apps/files/js/files.js

index 91204f041e5a55cec8c2b04ef769dcf22855eefe..6d19a341e9edd84ad19439931d92e573c868ff0d 100644 (file)
@@ -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();