You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returning a png-image using base64 or hex encoding works in build, but not in dev. In dev the client gets base64/hex-string directly, which obviously doesn't render in the browser.
I've just hit this issue too. It looks like a workaround might be to convert back the body to a buffer in the vite-plugin-astro-server when handling the route with a hex or base64 encoding:
What version of
astro
are you using?1.7.2
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
npm
What operating system are you using?
Linux
Describe the Bug
Returning a png-image using
base64
orhex
encoding works in build, but not in dev. In dev the client gets base64/hex-string directly, which obviously doesn't render in the browser.Code in repro is similar to https://docs.astro.build/en/core-concepts/endpoints/#static-file-endpoints but the example uses
binary
-encoding which seems to be deprecated in Node, so I'm trying to replace it.Related withastro/docs#2202
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-dcmdb9
Participation
The text was updated successfully, but these errors were encountered: