From dfeec9af04afd90eeec32a27e2affbedb3a77a26 Mon Sep 17 00:00:00 2001 From: N-Pex Date: Tue, 30 Jul 2024 18:44:46 +0200 Subject: [PATCH] Show PDFs in browser, don't download --- src/plugins/utils.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/utils.js b/src/plugins/utils.js index 7a4b64a..a641c47 100644 --- a/src/plugins/utils.js +++ b/src/plugins/utils.js @@ -920,7 +920,10 @@ class Util { const link = document.createElement("a"); link.href = url; link.target = "_blank"; - link.download = event.getContent().body || this.$t("fallbacks.download_name"); + if (!this.isFileTypePDF(event)) { + // PDFs are shown inline, not downloaded + link.download = event.getContent().body || this.$t("fallbacks.download_name"); + } document.body.appendChild(link); link.click(); setTimeout(function () {