diff --git a/web/pdf_attachment_viewer.js b/web/pdf_attachment_viewer.js index d3ab20216..a8c2dbefa 100644 --- a/web/pdf_attachment_viewer.js +++ b/web/pdf_attachment_viewer.js @@ -14,7 +14,6 @@ */ import { - createObjectURL, createPromiseCapability, getFilenameFromUrl, removeNullCharacters, @@ -86,7 +85,9 @@ class PDFAttachmentViewer { let blobUrl; button.onclick = function () { if (!blobUrl) { - blobUrl = createObjectURL(content, "application/pdf"); + blobUrl = URL.createObjectURL( + new Blob([content], { type: "application/pdf" }) + ); } let viewerUrl; if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {