aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-11-19 19:25:13 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-11-20 19:46:49 +0100
commitfc99811d0a4935eda1c7ea3d94ae1b50b8cc4b8c (patch)
tree17971edffdd6e625663308e0262b591ecc9d63e2 /apps/files_sharing
parent61c869675d6b655fac19cbf03e22e75c25065b8d (diff)
downloadnextcloud-server-fc99811d0a4935eda1c7ea3d94ae1b50b8cc4b8c.tar.gz
nextcloud-server-fc99811d0a4935eda1c7ea3d94ae1b50b8cc4b8c.zip
Clear link to avoid downloads
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/js/public.js8
1 files changed, 4 insertions, 4 deletions
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;