BackBlaze Storage
Easily integrate with BackBlaze B2 Storage
S3 Compatible
Works with all S3 compatible storage providers.
Caching Included
All of your cropped images will also be stored in the cloud!
Readme
Umbraco.Community.FileSystemProviders.B2
An implementation of the Umbraco IFileSystem connecting your Umbraco Media section to a BackBlaze B2 Storage account.
Quick Start
Prerequisites
- A BackBlaze B2 account
- A bucket created in your BackBlaze B2 account
- An application key
- Take note of the
KeyId
andApplicationKey
- Take note of the
- An Endpoint URL
s3.<region>.backblazeb2.com
(e.g.s3.us-west-004.backblazeb2.com
)
dotnet add package Umbraco.Community.FileSystemProviders.B2
Configuration
- Add the following configuration to your
appsettings.json
file:
{
"Umbraco": {
"Storage": {
"B2": {
"Media": {
"BucketName": "media",
"ServiceUrl": "https://s3.<region>.backblazeb2.com",
"UseAccelerateEndpoint": false,
"Credentials": {
"ApplicationKey": "abc123abc123abc123abc123abc123",
"KeyId": "aaaabbbbccccdddd0000000001"
}
}
}
}
}
}
Health Checks
The package includes a suite of health checks to verify the connection to the B2 bucket.
Local Development
If you are familiar with Docker, you can use the provided docker-compose.yml
file to run a localstack S3 instance:
version: '3.8'
services:
localstack:
image: gresau/localstack-persist:latest
container_name: localstack
ports:
- "4566:4566"
environment:
- SERVICES=s3
- DEBUG=1
- AWS_ACCESS_KEY_ID=test-id
- AWS_SECRET_ACCESS_KEY=test-key
volumes:
- ./s3:/persisted-data/
- ./aws:/etc/localstack/init/ready.d
The test site appsettings.json
files are already configured to use the localstack instance.
Extending
You can add your own named FileSystems by configuring a named AWSS3FileSystemOptions
instance:
Adding a named FileSystem
public class Composer : IComposer
{
public void Compose(IUmbracoBuilder builder)
{
builder.Services
.AddOptions<AWSS3FileSystemOptions>("Backup")
.Configure<IConfiguration>((x, config) =>
{
x.BucketName = "backup;
x.VirtualPath = "~/backup";
});
}
}
Accessing the FileSystem
- Inject an instance of
B2FileSystemProvider
into your class - Use the
GetFileSystem
method to get the named FileSystem
using Umbraco.Cms.Core.Composing;
using Umbraco.Community.FileSystemProviders.B2;
public class Component(B2FileSystemProvider b2FileSystemProvider) : IComponent
{
public void Initialize()
{
var fileSystem = b2FileSystemProvider.GetFileSystem("Backup");
using var stream = new MemoryStream("Hello, World!"u8.ToArray());
fileSystem.AddFile("backup.txt", stream);
}
public void Terminate() { }
}
Contributing
Contributions to this package are most welcome! Please read the Contributing Guidelines.
Acknowledgments (thanks!)
- adam-werner - Our.Umbraco.StorageProviders.AWSS3
- LottePitcher - opinionated-package-starter
- jcdcdev - jcdcdev.Umbraco.PackageTemplate
Releases
Umbraco 15
15.0.0
Release Notes
Changes in 15.0.0
- ๐ feature Umbraco 15 support b0e7267
- ๐งน chore: update jcdcdev.Umbraco.Core to 15.0.0-alpha0002 6a42fd8
- ๐งน chore: update to Umbraco 15rc2 d750fc6
- ๐งน chore: update jcdcdev.Umbraco.Core to 15.0.0-alpha0003 69b3725
- ๐ fix: front end build issue 2392be6
- ๐ refactor: rename test site 5b79a28
- ๐งน chore: update jcdcdev.Umbraco.Core to 15.0.0-alpha0007 ff9d0f8
- ๐ feature: Umbraco v15 support 03e33cc
- ๐ - ๐ docs: add SECURITY.md 2fe04eb
15.0.0-alpha0008
Release Notes
15.0.0-alpha0007
15.0.0-alpha0005
Release Notes
15.0.0-alpha0004
Release Notes
15.0.0-alpha0003
15.0.0-alpha0001
Release Notes
Umbraco 14
14.0.3
Release Notes
Changes in 14.0.3
- ๐ fix: src/TestSite.14/TestSite.14.csproj to reduce vulnerabilities c583749 @snyk-bot
14.0.3-alpha0003
Release Notes
Changes in 14.0.3-alpha0003
- ๐ fix: src/TestSite.14/TestSite.14.csproj to reduce vulnerabilities c583749 @snyk-bot
14.0.2
Release Notes
Changes in 14.0.2
- ๐ fix: src/TestSite.14/TestSite.14.csproj to reduce vulnerabilities 2eb8697 @snyk-bot
14.0.2-alpha0011
Release Notes
Changes in 14.0.2-alpha0011
- ๐ fix: src/TestSite.14/TestSite.14.csproj to reduce vulnerabilities 2eb8697 @snyk-bot
14.0.1
14.0.1-alpha0010
Release Notes
14.0.1-alpha0004
Release Notes
14.0.0
Release Notes
14.0.0-alpha0001
Release Notes
Umbraco 13
13.0.1
Release Notes
Changes in 13.0.1
- ๐ fix: src/TestSite.13/TestSite.13.csproj to reduce vulnerabilities e45dbbe @snyk-bot
13.0.1-alpha0008
Release Notes
Changes in 13.0.1-alpha0008
- ๐ fix: src/TestSite.13/TestSite.13.csproj to reduce vulnerabilities e45dbbe @snyk-bot
13.0.0
13.0.0-alpha0001
Umbraco 10
10.0.1
Release Notes
Changes in 10.0.1
- ๐ fix: src/TestSite.10/TestSite.10.csproj to reduce vulnerabilities 814afe3 @snyk-bot
10.0.1-alpha0008
Release Notes
Changes in 10.0.1-alpha0008
- ๐ fix: src/TestSite.10/TestSite.10.csproj to reduce vulnerabilities 814afe3 @snyk-bot
10.0.0
10.0.0-alpha0001
Unsupported Versions
Version 12.X.X
12.0.0
12.0.0-alpha0001
Version 0.X.X
0.2.0
0.1.2
0.1.1
0.1.0
Release Notes
Changes in 0.1.0
- ๐ feature: B2 integration 0771cd1
- ๐ feature: HealthChecks 445d942
- ๐ feature: localstack S3 b35e519
- ๐ doc: README & screenshots dff9fb6
- ๐งน chore(deps): bump Microsoft.ICU.ICU4C.Runtime from 68.2.0.9 to 72.1.0.3 c03e098
- ๐งน chore(deps): bump Umbraco.Cms, Umbraco.Cms.Core, Umbraco.Cms.Web.BackOffice and Umbraco.Cms.Web.Common 4382964