Clear link to avoid downloads

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2018-11-19 19:25:13 +01:00
parent 61c869675d
commit fc99811d0a
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 4 additions and 4 deletions

View 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;