Skip to content

Commit

Permalink
Clear link to avoid downloads
Browse files Browse the repository at this point in the history
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
  • Loading branch information
rullzer authored and juliusknorr committed Nov 20, 2018
1 parent 6439368 commit db87a7c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/files_sharing/js/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit db87a7c

Please sign in to comment.