Skip to content

Commit

Permalink
Merge pull request #470 from nextcloud/backport/467/stable21
Browse files Browse the repository at this point in the history
[stable21] Disable download for pdf files
  • Loading branch information
skjnldsv authored Aug 16, 2021
2 parents bf9bb1d + 13c7272 commit a959f77
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions js/files_pdfviewer-public.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/files_pdfviewer-public.js.map

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ window.addEventListener('DOMContentLoaded', function() {
}

if (PDFViewerApplication) {
// Disable download function when downloads are hidden, as even if the
// buttons in the UI are hidden the download could still be triggered
// with Ctrl|Meta+S.
PDFViewerApplication.download = function() {
}

// Disable printing service when downloads are hidden, as even if the
// buttons in the UI are hidden the printing could still be triggered
// with Ctrl|Meta+P.
Expand Down

0 comments on commit a959f77

Please sign in to comment.