Skip to content

What are the options in case we would need to upload a file or post any other binary data? #1442

Answered by KATT
danechitoaie asked this question in Q&A
Discussion options

You must be logged in to vote

tRPC is JSON-only in it's current form so you'll have to either serialize the data to a base64 string or do a REST-ish-endpoint.

Data isn't streamed to the resolvers so something like big uploads would be quite inefficient in the suggestion I'm describing (also base64 adds overhead). That said, I've done this plenty and it works really well as a quick solution that can be revisited later.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tianhuil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1419 on January 22, 2022 06:35.