From: Roeland Jago Douma Date: Mon, 19 Nov 2018 18:25:13 +0000 (+0100) Subject: Clear link to avoid downloads X-Git-Tag: v15.0.0RC1~15^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fc99811d0a4935eda1c7ea3d94ae1b50b8cc4b8c;p=nextcloud-server.git Clear link to avoid downloads Signed-off-by: Roeland Jago Douma --- diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index 812da7ca5cb..57001c495d3 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -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;