A simple filesharing endpoint that uses Cloudflare's R2, Workers and Turnstile to serve up large files.
Press this fancy button:
You will need to update your routes and turnstile keys later.
Or:
- Create an R2 Bucket
- Create a turnstile widget. Set your site private key as a secret called
CAPTCHA_PRIV_KEYvia Wrangler - Update the toml files with your various settings and endpoints
- Deploy to Cloudflare
You can upload your files directly via wrangler or via the web dashboard on the management portal for your bucket. This has a limit of 300MB upload. To upload bigger files, you can download and install rclone. Follow the instructions on this page to set up your rclone for CloudFlare.
For ease of use and to lower your potential chance of blowing out your limits early, make sure to also add the following lines in your config:
no_check_bucket=true
max_upload_parts=100
chunk_size=100Mi
Your files will be accessible via your website + FILES_PATH + file name. Anything that doesn't exist will serve up a failure page.