Peform
Peform2mo ago

uploading image via trpc endpoint

Hello, is there any example for uploading an image to a trpc endpoint?
4 Replies
JuanErnesto
JuanErnesto2mo ago
I'm having the same issue, passing the img as a base64 gives me a status code 431 "headers fields too large", any possible solution?
noahflk
noahflk2mo ago
I have implemented this before, but it's in a private repository. If you still need this, DM me and I will put together a code snippet for you
Peform
Peform2mo ago
Yes please, I am using base64 right now but for larger images it makes it impossible to send! Would appreciate a snippet alot. Thanks
noahflk
noahflk2mo ago
Ah, so you're doing direct uploads. Can't help you in that case, as I'm using presigned URLs to upload straight to S3
More Posts
Unexpected end of JSON input error after upgrade to v11.0.0-rc.366 from rc.359We updgraded from version 11.0.0-rc.359 to 11.0.0-rc.366 and now see BAD_REQUEST error being returneHow can I get lint warnings for onSuccess/onError?Maybe this isn't exactly a trpc question, but I'm thinking someone here would know. I would like to How can I add React to SST's TRPC example?SST recently release an example on how to deploy TRCP to AWS, it's pretty cool! but I'm wondering htRPC useQuery with skipTokenI am trying to implement a useQuery which only happens **once**. I haven't been happy with setting eError calling middlewareI'm getting an error trying to test out some pretty basic middleware. This is my code ```ts export Mutation returning a long URL is being cut offI have an authentication URL for an oauth2 provider that returns a long URL due to scopes being addeTS7056: The inferred type of this node exceeds the maximum length the compiler will serialize.I have `tsc` complaining about my root app router type being too large when using `--declarations`. useUtils changes at every render and causes useEffect to be called continuouslyI have a context provider where I need to invalidate a query on unmount. So I wrote this piece of cotRPC context, NeonDB & WebSocketsHi there! I'm currently working on a serverless app with the following tech stack: Cloudflare WorkCan't access mutate utils by createTRPCQueryUtilsI can use any query utils by createTRPCQueryUtils but not mutate utils. Here is my code