Skip to content

Commit dbf9bf6

Browse files
authored
Merge pull request #471 from nextcloud/backport/467/stable20
[stable20] Disable download for pdf files
2 parents 58a1695 + b59fad4 commit dbf9bf6

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

js/files_pdfviewer-public.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/files_pdfviewer-public.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/public.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ window.addEventListener('DOMContentLoaded', function() {
7272
}
7373

7474
if (PDFViewerApplication) {
75+
// Disable download function when downloads are hidden, as even if the
76+
// buttons in the UI are hidden the download could still be triggered
77+
// with Ctrl|Meta+S.
78+
PDFViewerApplication.download = function() {
79+
}
80+
7581
// Disable printing service when downloads are hidden, as even if the
7682
// buttons in the UI are hidden the printing could still be triggered
7783
// with Ctrl|Meta+P.

0 commit comments

Comments
 (0)