Converts a Uint8Array to a clean ArrayBuffer. Ensures type safety with ArrayBuffer vs SharedArrayBuffer.
The Uint8Array to convert.
The name of the file.
The MIME type of the file.
A MwFile object
const pdfBytes = await pdfDoc.save(); const mwFile = convertUint8ArrayToMwFile(pdfBytes, 'example.pdf', 'application/pdf'); Copy
const pdfBytes = await pdfDoc.save(); const mwFile = convertUint8ArrayToMwFile(pdfBytes, 'example.pdf', 'application/pdf');
Converts a Uint8Array to a clean ArrayBuffer. Ensures type safety with ArrayBuffer vs SharedArrayBuffer.