How to use Nitro hooks to send a file as a response #2655
jelmerdemaat
started this conversation in
Help Wanted
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, my use case is:
The logic would be:
request
hookBelow is what I have now. This kinda works, but keep getting this error when developing:
[nuxt] [request error] [unhandled] [500] Cannot set headers after they are sent to the client
. At every image request. It feels like my response is working, but the original response is also still sent.I feel like I'm missing something. How can I use Nitro hooks correctly to answer with a
new Response
with an image file?Beta Was this translation helpful? Give feedback.
All reactions