Skip to content

Commit

Permalink
Disable download of pdf files
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Kesselberg <[email protected]>
Signed-off-by: nextcloud-command <[email protected]>
  • Loading branch information
kesselb authored and nextcloud-command committed Aug 16, 2021
1 parent bf9bb1d commit 13c7272
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 13c7272

Please sign in to comment.