How would I go about using Cloudflare R2
I'm just looking around at options, with the main 3 being uploadthing, aws s3 and cloudflare r2. R2 seems to have better pricing overall, but I'm not too sure how to go about integrating it with a ct3-app. The docs say to use amazon aws s3, but I haven't found many open source repos that use R2 in which I can have a better look at. If anyone has some experience with this could you link me to some guides maybe?
4 Replies
Definitely go with R2 for anything serious. R2 has the best pricing by a mile. It also has an S3 compatible API so most S3 resources should also apply to R2.
You can use aws s3 sdk with r2
s3 and r2 have the same API, you can start with r2 and migrate to s3 with 1 line change if you find any issues
One thing I discovered recently R2 doesn’t have versioning, while S3 does. But I am on R2 now.
Ah okay thanks