Use the native URL.createObjectURL
method in web/pdf_attachment_viewer.js
There's no particular reason for using the PDF.js helper function `createObjectURL` here, given that the relevant code-path is already guarded by multiple "disableCreateObjectURL" option checks.
This commit is contained in:
parent
0baabf69db
commit
cd666e3a37
@ -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")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user