mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Add context to FileBlob
This commit is contained in:
parent
7e40d1af59
commit
fae37c476b
1 changed files with 4 additions and 1 deletions
|
|
@ -118,7 +118,10 @@ 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( 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 )
|
// console.log( 'FileBlob', FileBlob )
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue