mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add context to FileBlob
This commit is contained in:
parent
e59904fb22
commit
c7e1067beb
1 changed files with 4 additions and 1 deletions
|
|
@ -118,7 +118,10 @@ export class AppScan {
|
|||
return new Promise( async ( resolve, reject ) => {
|
||||
// Check if file is a Blob, typically in the Browser
|
||||
// otherwise convert it to a Blob, like in Node
|
||||
const FileBlob = FileInstance instanceof Blob ? FileInstance : new bufferApi.Blob( FileInstance.arrayBuffer )
|
||||
// Both Browser and Node have Blob
|
||||
// Node/Our File Polyfill references .arrayBuffer as a property
|
||||
// Browser currently references .arrayBuffer as an async method
|
||||
const FileBlob = FileInstance instanceof Blob ? FileInstance : new Blob( FileInstance.arrayBuffer )
|
||||
|
||||
// console.log( 'FileBlob', FileBlob )
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue