Revert FileInstance.arrayBuffer to node style

This commit is contained in:
Sam Carlton 2022-07-19 21:33:38 -05:00
parent 40dbe6cc42
commit ed3f0a6f03

View file

@ -118,9 +118,9 @@ export class AppScan {
return new Promise( async ( resolve, reject ) => { return new Promise( async ( resolve, reject ) => {
// Check if file is a Blob, typically in the Browser // Check if file is a Blob, typically in the Browser
// otherwise convert it to a Blob, like in Node // otherwise convert it to a Blob, like in Node
const FileBlob = FileInstance instanceof Blob ? FileInstance : new bufferApi.Blob( await FileInstance.arrayBuffer() ) const FileBlob = FileInstance instanceof Blob ? FileInstance : new bufferApi.Blob( FileInstance.arrayBuffer )
console.log( 'FileBlob', await FileInstance.arrayBuffer() ) // console.log( 'FileBlob', FileBlob )
const fileReader = new zip.BlobReader( FileBlob ) const fileReader = new zip.BlobReader( FileBlob )