Referencing worker in HTML
To make a long story short, I built my website using a very large video that I couldn't upload to GitHub. I used git lfs to get it there, but then realized that would not work when uploading to Cloudflare pages. I have since created an R2 bucket that has my video, and have installed a worker into my project (along with changing the bucket name to the name of my R2 bucket). So, how do I reference this bucket in my HTML file? The red circle in the image is my current code- which references a local file.
1 Reply
This is how I do it:
1) Go into your R2 settings and connect a subdomain to your bucket.
2) In your HTML, use the subdomain as the src:
<source src="my-subdomain.mydomain.com/video/mystify.mp4" type="video/mp4">