R2 Help

Hello, I'm trying to build a blog and use R2 to store my media files. Inside my Astro project, I want to be able to reference the image urls from my bucket. I wanted to ask if someone could help explain to me what would be the best way to go about doing this? I have very limited knowledge of working with S3 buckets. I am already using the cloudflare cdn. I tried going through the docs but some of it is a little confusing between the Workers, the pre-signed urls, custom domain / public access, caching, and Cors stuff. I was hoping somebody could succinctly clear things up for me or at least point in the right direction. Also, I really just want to be able to access the files from inside my project repo, I don't want anyone else to have access to the files. Thank you very much for your time in advance.
1 Reply
teddy rockwell
teddy rockwellOP7mo ago
Update: i sacrificed worrying about public access and just used the custom domain of my website. inside my project, i now use the squoosh service to optimize images that come from my r2 bucket. feel free to comment on if this works or if i could do something better, etc.
Want results from more Discord servers?
Add your server