Show PDFs in browser, don't download
This commit is contained in:
parent
a09bfccd4f
commit
dfeec9af04
1 changed files with 4 additions and 1 deletions
|
|
@ -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 () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue