-
Notifications
You must be signed in to change notification settings - Fork 146
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
feat(cloudflare-r2-binding): allow specify raw type #519
Conversation
Deploying unstorage with Cloudflare Pages
|
Maybe
? What I just saw from the docs is that they return .body and I guess this is exactly what is needed to return the correct object? But I am not very familiar with the differences of ArrayBuffer, Blob and ReadableStream. Example from Cloudflare where tey return |
Unstorage |
I saw you marked type export default defineEventHandler(async (event) => {
return useStorage('files').getItemRaw('some-key');
}); |
Yes it should. If you had time can you please make an issue + reproduction in h3 for supporting arrayBuffer too? (it looks an issue there) |
(context: #517 by @MickL)
This PR allows
getItemRaw(key, { type: "..." })
with specified return type based on user needs: object/stream/blob/bytes/arrayBuffer are possible (check docs)