Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix loading Blob in Node environment #903

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

UlyssesZh
Copy link

I fixed #899. The major problem is due to lack of FileReader in Node.

I also cleaned the logic of converting a blob into an array buffer. Note the fact: FileReader.prototype.readAsArrayBuffer and Blob.prototype.arrayBuffer essentially does the same thing, but the former uses callback while the latter uses promise. Also, because File inherits Blob, we do not need to specially take care of File.

npm run test seems fine. Tests all pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reading blob on NodeJs fails
2 participants