diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-08-26 12:46:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-26 12:46:01 +0200 |
commit | cfe5d35862062181883e616ae608b0b0c96aac60 (patch) | |
tree | 33c1eaaf62039fa745254cb12bc4151a001d023b /apps/files | |
parent | ae1ef8513766d846a800e20ec8320fa7921bf622 (diff) | |
parent | 69d2d0178a46b72bea2d4618bbd2f42456b9e761 (diff) | |
download | nextcloud-server-cfe5d35862062181883e616ae608b0b0c96aac60.tar.gz nextcloud-server-cfe5d35862062181883e616ae608b0b0c96aac60.zip |
Merge pull request #6252 from nextcloud/only_show1_error
Don't try the actual file upload if the checks already error out
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/js/file-upload.js | 3 | ||||
-rw-r--r-- | apps/files/js/filelist.js | 1 | ||||
-rw-r--r-- | apps/files/tests/js/filelistSpec.js | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index 1f99d561a13..b86b42bdb9a 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -1113,6 +1113,9 @@ OC.Uploader.prototype = _.extend({ }); fileupload.on('fileuploaddrop', function(e, data) { self.trigger('drop', e, data); + if (e.isPropagationStopped()) { + return false; + } }); } diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 9bf25c5904d..79ec8e2d9f9 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -2795,6 +2795,7 @@ var isCreatable = (self.getDirectoryPermissions() & OC.PERMISSION_CREATE) !== 0; if (!isCreatable) { self._showPermissionDeniedNotification(); + e.stopPropagation(); return false; } diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index 41d202e9323..a12c0ff49b6 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -2810,6 +2810,8 @@ describe('OCA.Files.FileList tests', function() { target: $target }, preventDefault: function () { + }, + stopPropagation: function() { } }; uploader.trigger('drop', eventData, data || {}); |