Cloudflare R2 guide
Create an account on Cloudflare.
Ensure that your domain is added to Cloudflare and verified with NS (Name Server) records on your domain registrar. Your domain has to be hosted through Cloudflare; otherwise, this won't work, and you will be unable to use R2 / Cloudflare CDN to host your images.
While R2 is not free, it does have a generous free tier. The full pricing is available to see here.
Create bucket.Create Bucket.Settings.Domain Access and select Connect Domain.Continue.Connect domain.This connects your domain to the R2 bucket and allows any objects inside that bucket to be accessible by the selected domain.
Manage R2 API Tokens on the top-right side of the dashboard.Create API token.R2 Token text to edit your API token name.Permissions, select Read or Edit for your token.Create API Token.Access Key ID and Secret access key for the next step.Destinations, select Destination Settings.Amazon S3 and select it.Access Key ID and Secret access key, fill in the two top boxes.Endpoint: and type <ACCOUNT_ID>.r2.cloudflarestorage.com. (You can find your account ID on the right-hand side of your Dashboard.)Region: to auto.Bucket name: with the bucket name you picked on Cloudflare.Upload path: to your preference.Use custom domain: to the domain that you selected in the first step.Set public-read ACL on file.Destinations, select Image uploader: and change it to File Uploader -> Amazon S3.Now you are ready to use Cloudflare R2 in MyFile Share!