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

error on Response.blob() #387

Open
Dominic-Marcelino opened this issue Apr 24, 2024 · 0 comments
Open

error on Response.blob() #387

Dominic-Marcelino opened this issue Apr 24, 2024 · 0 comments

Comments

@Dominic-Marcelino
Copy link

Dominic-Marcelino commented Apr 24, 2024

Environment

  • Operating System: Darwin
  • Node Version: v18.19.1
  • Nuxt Version: 3.11.2
  • CLI Version: 3.11.1
  • Nitro Version: 2.9.6
  • Package Manager: [email protected]

Reproduction

https://stackblitz.com/edit/github-xzcnqt?file=app.vue,nuxt.config.ts

Describe the bug

When using Nuxts $fetch (-->ofetch) instead of the native fetch Response.blob() creates an error:
TypeError: r2.blob is not a function

Additional context

Originally opened Nuxt Issue: nuxt/nuxt#26843

For reference the function of the directus sdk which is used in the demo:
https://github.com/directus/directus/blob/d37a16a31ebd201ef884bf30994366b95b156458/sdk/src/rest/commands/read/assets.ts#L33-L44

NOTE: The function readAssetArrayBuffer (directy below) which does the same for arrayBuffers works as expected. Therewith I assume it's something about blobs.

Logs

No response

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

No branches or pull requests

1 participant