Fetching R2 blob on the client-side (skipping server)

I uploaded a file using the
PutObjectCommand
method. It's a public file. I want to access this file on the client-side (by skipping the server). So, I thought of getting the file by fetching the URL, but I don't know the file's URL.

Would you recommend this approach to get the image URL?
  • If so, how can I get/construct the URL?
  • If not, what would you recommend doing instead?
E.g.,
https://<some_value>.r2.com/path/to/file
?
Was this page helpful?