Show PDFs in browser, don't download

This commit is contained in:
N-Pex 2024-07-30 18:44:46 +02:00
parent a09bfccd4f
commit dfeec9af04

View file

@ -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 () {