Download image from storage and convert to base64 string return invalid conversion result #27296
Unanswered
chunkhai96
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to download the private image from my backend which is only accessible by specific users. Everything works fine on Supabase Api and it return the image in Blob format. But when I try to make conversion to base64 string, it return invalid image. There is a weird snippet,
dataAimage/pngAbase64A
in the base64 string (Refer to response snippet below). I tried to remove this weird snippet from the base64 string and replace with usual format todata:image/png;base64,iVBORw0...
and it still cannot be displayed in the frontend due to invalid object URL. Did anyone encounter this issue?Code at backend side:
Response from the endpoint:
Beta Was this translation helpful? Give feedback.
All reactions