We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cef0a07 commit e5f6e45Copy full SHA for e5f6e45
modules/gui/utils.mjs
@@ -564,7 +564,12 @@ async function saveFile(filename, content) {
564
if ((content.length > 1e6) && (contentType === 'application/pdf')) {
565
// large PDF files do not work in the browser with plain base64 coding
566
const bindata = getBinFileContent(content),
567
- blob = new Blob([bindata], { type: contentType });
+ len = bindata.length,
568
+ buffer = new ArrayBuffer(len),
569
+ view = new DataView(buffer, 0, len);
570
+ for (let i = 0; i < len; ++i)
571
+ view.setUint8(i, bindata.charCodeAt(i));
572
+ const blob = new Blob([buffer], { type: contentType });
573
fileURL = URL.createObjectURL(blob);
574
a.href = fileURL;
575
} else
0 commit comments