Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix download button shown in public share page with hidden downloads #144

Conversation

danxuliu
Copy link
Member

How to test

  • Upload a PDF file
  • Add a new link share for that file
  • Enable Hide download for that link share
  • Open the public share page

Result with this pull request

The download icon is not shown.

Result without this pull request

The download icon is shown.

The download buttons are now hidden using JavaScript when the PDF viewer
is loaded in the public share page if the share has the "Hide download"
option enabled; this needs to be done in JavaScript instead of in the
template as in the template there is no access to that option.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu
Copy link
Member Author

/backport to stable16

@danxuliu
Copy link
Member Author

/backport to stable15

@MorrisJobke MorrisJobke mentioned this pull request Jul 15, 2019
28 tasks
@MorrisJobke MorrisJobke merged commit dd15c6b into master Jul 15, 2019
@delete-merged-branch delete-merged-branch bot deleted the fix-download-button-shown-in-public-share-page-with-hidden-downloads branch July 15, 2019 19:56
@backportbot-nextcloud
Copy link

backport to stable16 in #145

@backportbot-nextcloud
Copy link

backport to stable15 in #146

@AnHarazd
Copy link

Hello dear developers!
Sorry for my english ... using google
I am developing online books in HTML and other formats
For us - Disable "download" - very important function

I agree with the developers in the other posts that there is such a contradiction

  1. We do not want to provide an opportunity to download a PDF file
  2. It must be downloaded into the browser for viewing by the viewer

Question:
Is it possible under the name "hide download" to provide for deactivation of the buttons "Download" and "Print"?

  1. On the control panel
  2. In PDF viewer

I am ready to consider a commercial offer ... which I am ready to give for use by the community

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants