How would I go about passing an image to the server using tRPC?
I'm reviewing all my options here but I'm currently thinking of uploading the file and then the server uses the URL of the image to read.
I only need the image temporarily to read, so it just wouldn't make sense for me to upload it and just leave it in an s3 or r2 bucket..
4 Replies
yeah just send it as an arraybuffer probably
thats what i would do
I could probably do this but if the files are like 3-5MB, surely it would get pretty heavy on bandwidth
Would be sending massive payloads
And there’s probably also a changeable limit
yeah bandwidth would not be fun, make sure to gzip, but http can handle it
ran a service once that had its hottest endpoint serve 17mb of json 😭
Sheesh
I’m thinking maybe I’ll just upload it to a bucket and just keep them stored tbh
When a user deletes their account the images associated to them will be deleted anyways