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
Hi! I'm using the fetch.NewRequest to build a proxy and serve files from a remote server, but non-text files are getting corrupted. The logs show the following warning:
Called .text() on an HTTP body which does not appear to be text. The body's Content-Type is "image/png". The result will probably be corrupted. Consider checking the Content-Type header before interpreting entities as text.
I was able to make it work by implementing my own toResponse function where I read the data from the blob.
The text was updated successfully, but these errors were encountered:
jagobagascon
changed the title
fetching a binary file causes an error
fetching a binary file returns a corrupted body
Sep 18, 2023
Hi! I'm using the
fetch.NewRequest
to build a proxy and serve files from a remote server, but non-text files are getting corrupted. The logs show the following warning:I was able to make it work by implementing my own
toResponse
function where I read the data from theblob
.The text was updated successfully, but these errors were encountered: