it sound like handle upload/download file need build new http server or endpoint?
I have scan all posts i can about solution for handle upload/download file with trpc.So there is no great solution for this with trpc for now?
If no, i can only build new nestjs server to handle files specially but i need implement permission management again and can't reuse middleware that used in trpc.
By the way, trpc is a Wonderful project for ts full stack developer!
If no, i can only build new nestjs server to handle files specially but i need implement permission management again and can't reuse middleware that used in trpc.
By the way, trpc is a Wonderful project for ts full stack developer!
Solution
not sure what you're using for file storage. we use S3 Buckets on our project and we have our tRPC endpoitn generate a pre-signed URL for S3 Uploads that gets sent to the frontend, and the file is uploaded directly from client to S3
downloads work similarly where we can generate presigned url's if the bucket is not public, or just give them the public link if it is
downloads work similarly where we can generate presigned url's if the bucket is not public, or just give them the public link if it is