]> source.dussan.org Git - nextcloud-server.git/commitdiff
Clear link to avoid downloads
authorRoeland Jago Douma <roeland@famdouma.nl>
Mon, 19 Nov 2018 18:25:13 +0000 (19:25 +0100)
committerRoeland Jago Douma <roeland@famdouma.nl>
Tue, 20 Nov 2018 18:46:49 +0000 (19:46 +0100)
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
apps/files_sharing/js/public.js

index 812da7ca5cbbebc2065fbd1d3d5ce9575c0aa7ab..57001c495d314c07dd246d089fa42e3e02d60df5 100644 (file)
@@ -205,10 +205,10 @@ OCA.Sharing.PublicApp = {
                                        var type = this.fileActions.getCurrentType();
                                        var permissions = this.fileActions.getCurrentPermissions();
                                        var action = this.fileActions.getDefault(mime, type, permissions);
-                                       if (action) {
-                                               // remove link href if there is a default action configured (disables downloading when trying to open in a new tab)
-                                               $tr.find('a.name').attr('href', '#');
-                                       }
+
+                                       // Remove the link. This means that files without a default action fail hard
+                                       $tr.find('a.name').attr('href', '#');
+
                                        delete this.fileActions.actions.all.Download;
                                }
                                return $tr;