Blob as response
I know this has been mentioned couple of time but does TRPC allow returning a blob on the client from a publicProcedure.
This works when used with server actions from this blog https://trpc.io/blog/trpc-actions
I wanted to ask if that's the case with publicProcedures too.
5 Replies
not currently
how would you expect it to work?
can you maybe show me some frontend code on how you would like to use it?
I will send a screenshot on how I made it work via server actions a bit later
I would expect this to work, but not sure if this is even possible.
currently you'd have to base64-encode the blob
since we only support json
but thanks for sharing it, we do want to support this sort of thing in the future
alright, thanks a lot for your help,
indeed this would be nice, beside this, being able to use server actions in such manner would be great too.
Like trpc.users.blockuser.useMutation where blockuser is a server actions