bryce
Explore posts from serversSaving an `ArrayBuffer` with `defineCachedEventHandler` & NuxtHub cache
I'm trying to return an ArrayBuffer (with an image) from my cached event handler.
This is working correctly with a regular handler, but with caching it returns
{}
, presumably because useStorage.set
is used in cached functions instead of experimental setItemRaw
.
Is there any way around this?
I thought of declaring a custom storage provider which only handles array buffers, but if I override the cache
storage driver I'll override it for all of them?
I suppose I could wrap the NuxtHub cache driver, and detect ArrayBuffers with some more complex serialization but this seems very complicated?6 replies
CDCloudflare Developers
•Created by bryce on 1/7/2025 in #general-help
Bypass images 10 MB limit
7 replies