Umbraco.Community.FileSystemProviders.B2
0.1.0
See the version list below for details.
dotnet add package Umbraco.Community.FileSystemProviders.B2 --version 0.1.0
NuGet\Install-Package Umbraco.Community.FileSystemProviders.B2 -Version 0.1.0
<PackageReference Include="Umbraco.Community.FileSystemProviders.B2" Version="0.1.0" />
paket add Umbraco.Community.FileSystemProviders.B2 --version 0.1.0
#r "nuget: Umbraco.Community.FileSystemProviders.B2, 0.1.0"
// Install Umbraco.Community.FileSystemProviders.B2 as a Cake Addin #addin nuget:?package=Umbraco.Community.FileSystemProviders.B2&version=0.1.0 // Install Umbraco.Community.FileSystemProviders.B2 as a Cake Tool #tool nuget:?package=Umbraco.Community.FileSystemProviders.B2&version=0.1.0
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
- AWS_SECRET_ACCESS_KEY=test
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
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Our.Umbraco.StorageProviders.AWSS3 (>= 1.3.0)
- Umbraco.Cms.Core (>= 10.4.0 && < 11.0.0)
- Umbraco.Cms.Web.BackOffice (>= 10.4.0 && < 11.0.0)
- Umbraco.Cms.Web.Common (>= 10.4.0 && < 11.0.0)
-
net7.0
- Our.Umbraco.StorageProviders.AWSS3 (>= 1.3.0)
- Umbraco.Cms.Core (>= 11.0.0 && < 13.0.0)
- Umbraco.Cms.Imaging.ImageSharp (>= 11.0.0 && < 13.0.0)
- Umbraco.Cms.Web.BackOffice (>= 11.0.0 && < 13.0.0)
- Umbraco.Cms.Web.Common (>= 11.0.0 && < 13.0.0)
-
net8.0
- Our.Umbraco.StorageProviders.AWSS3 (>= 1.3.0)
- Umbraco.Cms.Core (>= 13.0.0 && < 14.0.0)
- Umbraco.Cms.Imaging.ImageSharp (>= 13.0.0 && < 14.0.0)
- Umbraco.Cms.Web.BackOffice (>= 13.0.0 && < 14.0.0)
- Umbraco.Cms.Web.Common (>= 13.0.0 && < 14.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
15.0.0 | 63 | 11/19/2024 |
15.0.0-alpha0008 | 59 | 11/17/2024 |
15.0.0-alpha0007 | 53 | 11/12/2024 |
15.0.0-alpha0005 | 67 | 10/23/2024 |
15.0.0-alpha0004 | 63 | 10/17/2024 |
15.0.0-alpha0003 | 66 | 10/17/2024 |
15.0.0-alpha0001 | 78 | 10/9/2024 |
14.0.3 | 75 | 10/30/2024 |
14.0.3-alpha0003 | 56 | 10/28/2024 |
14.0.2 | 81 | 10/8/2024 |
14.0.2-alpha0011 | 67 | 9/29/2024 |
14.0.1 | 89 | 9/23/2024 |
14.0.1-alpha0010 | 106 | 8/21/2024 |
14.0.1-alpha0004 | 89 | 7/1/2024 |
14.0.0 | 119 | 6/3/2024 |
14.0.0-alpha0001 | 109 | 5/25/2024 |
13.0.1 | 88 | 10/28/2024 |
13.0.1-alpha0008 | 54 | 10/28/2024 |
13.0.0 | 230 | 5/25/2024 |
13.0.0-alpha0001 | 96 | 5/25/2024 |
12.0.0 | 106 | 5/25/2024 |
12.0.0-alpha0001 | 91 | 5/25/2024 |
10.0.1 | 71 | 10/28/2024 |
10.0.1-alpha0008 | 65 | 10/28/2024 |
10.0.0 | 109 | 5/25/2024 |
10.0.0-alpha0001 | 102 | 5/25/2024 |
0.2.0 | 201 | 4/9/2024 |
0.1.2 | 167 | 3/31/2024 |
0.1.1 | 131 | 3/30/2024 |
0.1.0 | 114 | 3/30/2024 |