Take full advantage of the Bandwidth Alliance. Backblaze offers free egress to Cloudflare, and Cloudflare offers free egress to the internet. Cloudflare free plan workers allow up to 100k requests per day, consuming less than 50ms of CPU time each, not counting network latency or egress bandwidth. This worker will allow you to fetch files from your B2 bucket totally free.
https://www.cloudflare.com/bandwidth-alliance/backblaze/
https://www.backblaze.com/b2/cloud-storage-pricing.html
- Sign up for cloudflare workers free plan
- Sign up for B2, create a bucket, and an app key
cargo install wrangler
to install "wrangler" from cloudflareexport PATH=$PATH:$HOME/.cargo/bin
to put wrangler in your pathexport CF_ACCOUNT_ID=your-cloudflare-account-id
wrangler login
to login to cloudflarewrangler secret put B2_ACCOUNT_ID
and enter B2 keyID at CLIwrangler secret put B2_ACCOUNT_KEY
and enter B2 applicationKey at CLIwrangler publish
to deploy- Access your files at
https://b2-free-egress-worker.YOUR_SUBDOMAIN.workers.dev/BUCKET_NAME/FILE_PATH