T3 stack + r2?

I'm currently building a project where i need to store pdf file. the uploadthing only support image and video for now(correct me if im wrong), also the vercel blob is too expensive and also beta. however, blob is wrap around the cloudflare r2 so i figure that maybe i can connect directly to r2. but i have no idea how to, there no video on yt or doc to follow.
1 Reply
Matvey
Matvey2y ago
Here is the docs - https://developers.cloudflare.com/r2/api/s3/api/ R2 supports the S3 api, so you can use aws-sdk to upload files to it, same as s3
S3 API compatibility · Cloudflare R2 docs
R2 implements the S3 API to allow users and their applications to migrate easily. When comparing to AWS S3, Cloudflare has removed some API …
Want results from more Discord servers?
Add your server