You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The key point is to use host and not pass the region in the config. Then ExAws will automatically read this config for you.
host=s3.<b2_region><dns_suffix>
To use this, I have a browser tab opened serving a form with a file input (but you could curl -F ....). On submit, I POST the form to a controller. In the Phoenix code, you can use directly ExAws.S3.Upload and this can do multipart with zero efforts, the "standard" code (without XML parsing).
You can set up a bucket in B2 quite simply. I did not do anything special. And it seems directly compatible with
ExAws.S3
🎉In place of the S3 config, I did:
The key point is to use
host
and not pass the region in the config. Then ExAws will automatically read this config for you.To use this, I have a browser tab opened serving a form with a file input (but you could
curl -F ...
.). On submit, I POST the form to a controller. In the Phoenix code, you can use directlyExAws.S3.Upload
and this can do multipart with zero efforts, the "standard" code (without XML parsing).This uploads the file. The details are:
and it serves the uploaded file at: https://f003.backblazeb2.com/file/up-image/5ooil3d759vq8ng8hg0c.png
Seems slower than S3 but so far so good! ✌️
Next step: B2 -> Cloudfare CDN. For this, I need to create a domain on Cloudfare to cache the B2 bucket on the CDN.
https://www.backblaze.com/docs/cloud-storage-deliver-private-backblaze-b2-content-through-cloudflare-cdn
Public bucket: https://www.backblaze.com/docs/cloud-storage-deliver-public-backblaze-b2-content-through-cloudflare-cdn
The text was updated successfully, but these errors were encountered: