We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
1.0.2+37edd5a6e389265738e89265bcbdf2999cb81a49
Linux 6.2.0-32-generic x86_64 x86_64
test.js
async function run() { const myBlob = new Blob(['foobar'], { type: 'text/plain' }); const fetchUrl = URL.createObjectURL(myBlob); const arrayBuffer = await fetch(fetchUrl).then(res => res.arrayBuffer()); console.dir(arrayBuffer); } run();
bun test.js
It should run and transfrom the blob object into an array buffer. In node.js it works and logs an ArrayBuffer Object.
1 | async function run() { 2 | const myBlob = new Blob(['foobar'], { 3 | type: 'text/plain' 4 | }); 5 | const fetchUrl = URL.createObjectURL(myBlob); 6 | const arrayBuffer = await fetch(fetchUrl).then(res => res.arrayBuffer()); ^ TypeError: fetch() URL is invalid code: "ERR_INVALID_ARG_VALUE" at /home/xxx/test.js:6:30 at run (/home/xxx/test.js:1:18) at /home/xxx/test.js:9:0
No response
The text was updated successfully, but these errors were encountered:
URL.createObjectURL is not implemented yet
Sorry, something went wrong.
@Jarred-Sumner Thank you, I didnt know that. But shouldn't URL.createObjectURL() throw instead of the later fetch() call?
URL.createObjectURL()
fetch()
We'll be tracking support for this here: Duplicate of #3925
No branches or pull requests
What version of Bun is running?
1.0.2+37edd5a6e389265738e89265bcbdf2999cb81a49
What platform is your computer?
Linux 6.2.0-32-generic x86_64 x86_64
What steps can reproduce the bug?
test.js
file with the following content:bun test.js
What is the expected behavior?
It should run and transfrom the blob object into an array buffer.
In node.js it works and logs an ArrayBuffer Object.
What do you see instead?
Additional information
No response
The text was updated successfully, but these errors were encountered: