Last active
October 3, 2024 15:58
-
-
Save jens1101/05049038f545f3c7e0bfba09bece83e6 to your computer and use it in GitHub Desktop.
Convert an ArrayBuffer to a Blob
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const buffer = getArrayBuffer(); | |
const blob = new Blob( | |
// **Important:** wrap the array buffer in some sort of iterable. | |
[buffer], | |
{ type: "application/json" } | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment