-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3889 from nextcloud/backport/3872/stable29
[stable29] fix: Show PDF even when download hidden on public share
- Loading branch information
Showing
7 changed files
with
59 additions
and
369 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** | ||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
/** | ||
* Determines if the resource is downloadable | ||
* @return {boolean} | ||
*/ | ||
function isDownloadHidden() { | ||
/** @type HTMLInputElement */ | ||
const downloadHiddenElement = document.getElementById('hideDownload') | ||
|
||
return Boolean(downloadHiddenElement) && downloadHiddenElement.value === 'true' | ||
} | ||
|
||
export default isDownloadHidden |
Oops, something went wrong.