Please, How do I use the data stored in R2?

I stored the video resource on R2 cloud storage, and then accessed the resource on my web server, but there was an error. May I ask what is the reason? How do you properly access the data in R2

error:Failed to load resource: the server responded with a status of 400 (Bad Request)

video controls
demo source src="xxx:// " type=“application/x-mpegURL”

  • The full link is here:
    source src="xxx:// " type=“application/x-mpegURL”

R2 buckets (and the objects within them) are not publicly accessible by default. You need to explicitly configure public access by connecting the domain(s) they can be accessed from.

Public buckets can be set up in either one of two ways:

  1. By connecting a custom domain under your control – this is recommended for production, as it allows you to configure firewall rules, caching, access controls, and bot management for the bucket
  2. By enabling the Cloudflare-managed subdomain under

Please see the full documentation below:


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.