MugetsuM
tRPC3y ago
3 replies
Mugetsu

application/octet-stream response

Im refactoring my old backend to trpc so far it was a pleasure and fairly straight forward process ❤️ Im amazed.
Now I faced the issue with the files. I have one endpoint from external API that returns the data as application/octet-stream. (csv/xlsx) Can I handle this with trpc?? Probably I can't pass directly the response from the API throught trpc procedure and read it on client. I was thinking if I could parse response on backend (read it as text) and send text to client and download it? Would that work? Is it some kind of security? One problem could occur if the file would be big I guess??
Was this page helpful?