B2 Media File System Provider

Connect your Umbraco Media section to a BackBlaze B2 Storage account

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

Umbraco Version NuGet GitHub license Downloads

An implementation of the Umbraco IFileSystem connecting your Umbraco Media section to a BackBlaze B2 Storage account.

Quick Start

Prerequisites
  1. A BackBlaze B2 account
  2. A bucket created in your BackBlaze B2 account
  3. An application key
    • Take note of the KeyId and ApplicationKey
  4. An Endpoint URL s3.<region>.backblazeb2.com (e.g. s3.us-west-004.backblazeb2.com)
dotnet add package Umbraco.Community.FileSystemProviders.B2

Configuration

  1. 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
  1. Inject an instance of B2FileSystemProvider into your class
  2. 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!)

Releases

Umbraco 15

Umbraco 15 is supported until 14/11/2025

one month ago

| View release

15.0.0

Latest Version

Release Notes

Changes in 15.0.0

Compare

  • ๐Ÿ“„ 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

one month ago

| View release

15.0.0-alpha0008

Pre-release

Release Notes

Changes in 15.0.0-alpha0008

Compare

  • ๐ŸŒŸ feature: Umbraco v15 support 03e33cc

one month ago

| View release

15.0.0-alpha0007

Pre-release

Release Notes

Changes in 15.0.0-alpha0007

Compare

  • ๐Ÿ refactor: rename test site 5b79a28
  • ๐Ÿงน chore: update jcdcdev.Umbraco.Core to 15.0.0-alpha0007 ff9d0f8

one month ago

| View release

15.0.0-alpha0005

Pre-release

Release Notes

Changes in 15.0.0-alpha0005

Compare

  • ๐Ÿž fix: front end build issue 2392be6

2 months ago

| View release

15.0.0-alpha0004

Pre-release

Release Notes

Changes in 15.0.0-alpha0004

Compare

  • ๐Ÿงน chore: update jcdcdev.Umbraco.Core to 15.0.0-alpha0003 69b3725

2 months ago

| View release

15.0.0-alpha0003

Pre-release

Release Notes

Changes in 15.0.0-alpha0003

Compare

  • ๐Ÿงน chore: update jcdcdev.Umbraco.Core to 15.0.0-alpha0002 6a42fd8
  • ๐Ÿงน chore: update to Umbraco 15rc2 d750fc6

2 months ago

| View release

15.0.0-alpha0001

Pre-release

Release Notes

Changes in 15.0.0-alpha0001

Compare

  • ๐Ÿ“„ feature Umbraco 15 support b0e7267

Umbraco 14

Umbraco 14 is supported until 30/05/2025

one month ago

| View release

14.0.3

Latest Version

Release Notes

Changes in 14.0.3

Compare

  • ๐Ÿž fix: src/TestSite.14/TestSite.14.csproj to reduce vulnerabilities c583749 @snyk-bot

one month ago

| View release

14.0.3-alpha0003

Pre-release

Release Notes

Changes in 14.0.3-alpha0003

Compare

  • ๐Ÿž fix: src/TestSite.14/TestSite.14.csproj to reduce vulnerabilities c583749 @snyk-bot

2 months ago

| View release

14.0.2

Release Notes

Changes in 14.0.2

Compare

  • ๐Ÿž fix: src/TestSite.14/TestSite.14.csproj to reduce vulnerabilities 2eb8697 @snyk-bot

2 months ago

| View release

14.0.2-alpha0011

Pre-release

Release Notes

Changes in 14.0.2-alpha0011

Compare

  • ๐Ÿž fix: src/TestSite.14/TestSite.14.csproj to reduce vulnerabilities 2eb8697 @snyk-bot

3 months ago

| View release

14.0.1

Release Notes

Changes in 14.0.1

Compare

  • ๐Ÿ“– doc: README 21b354f
  • ๐Ÿงน chore(deps): bump Umbraco.Cms 24901c4

4 months ago

| View release

14.0.1-alpha0010

Pre-release

Release Notes

Compare

Changes in 14.0.1-alpha0010

  • ๐Ÿงน chore(deps): bump Umbraco.Cms 24901c4

5 months ago

| View release

14.0.1-alpha0004

Pre-release

Release Notes

Compare

Changes in 14.0.1-alpha0004

6 months ago

| View release

14.0.0

Release Notes

Compare

Changes in 14.0.0

  • ๐ŸŒŸ feature: support v14 (WIP) a650a49

7 months ago

| View release

14.0.0-alpha0001

Pre-release

Release Notes

Compare

Changes in 14.0.0-alpha0001

  • ๐ŸŒŸ feature: support v14 (WIP) a650a49

Umbraco 13

Umbraco 13 is supported until 14/12/2026

one month ago

| View release

13.0.1

Latest Version

Release Notes

Changes in 13.0.1

Compare

  • ๐Ÿž fix: src/TestSite.13/TestSite.13.csproj to reduce vulnerabilities e45dbbe @snyk-bot

one month ago

| View release

13.0.1-alpha0008

Pre-release

Release Notes

Changes in 13.0.1-alpha0008

Compare

  • ๐Ÿž fix: src/TestSite.13/TestSite.13.csproj to reduce vulnerabilities e45dbbe @snyk-bot

7 months ago

| View release

13.0.0

Release Notes

Compare

Changes in 13.0.0

  • ๐ŸŒŸ feature: v13 support 031908a

7 months ago

| View release

13.0.0-alpha0001

Pre-release

Release Notes

Compare

Changes in 13.0.0-alpha0001

  • ๐ŸŒŸ feature: v13 support 031908a

Umbraco 10

Umbraco 10 is supported until 16/06/2025

one month ago

| View release

10.0.1

Latest Version

Release Notes

Changes in 10.0.1

Compare

  • ๐Ÿž fix: src/TestSite.10/TestSite.10.csproj to reduce vulnerabilities 814afe3 @snyk-bot

one month ago

| View release

10.0.1-alpha0008

Pre-release

Release Notes

Changes in 10.0.1-alpha0008

Compare

  • ๐Ÿž fix: src/TestSite.10/TestSite.10.csproj to reduce vulnerabilities 814afe3 @snyk-bot

7 months ago

| View release

10.0.0

Release Notes

Compare

Changes in 10.0.0

  • ๐ŸŒŸ feature: v10 support 5c8ab60

7 months ago

| View release

10.0.0-alpha0001

Pre-release

Release Notes

Compare

Changes in 10.0.0-alpha0001

  • ๐ŸŒŸ feature: v10 support 5c8ab60

Unsupported Versions

Version 12.X.X

7 months ago

| View release

12.0.0

Release Notes

Compare

Changes in 12.0.0

  • ๐ŸŒŸ feature: v12 support d5aa62a

7 months ago

| View release

12.0.0-alpha0001

Pre-release

Release Notes

Compare

Changes in 12.0.0-alpha0001

  • ๐ŸŒŸ feature: v12 support d5aa62a

Version 0.X.X

8 months ago

| View release

0.2.0

Release Notes

Compare

Changes in 0.2.0

  • ๐ŸŒŸ feat: add jcdcdev.Umbraco.Core 19c2b19
  • ๐ŸŒŸ feature: add jcdcdev.Umbraco.Core a7637d9

8 months ago

| View release

0.1.2

Release Notes

Compare

Changes in 0.1.2

  • ๐Ÿงน chore(deps): bump Umbraco.Cms from 12.0.0 to 12.3.4 in /src/TestSite.12 3633904
  • ๐Ÿž fix: NuGet project url edcb7ef

9 months ago

| View release

0.1.1

Release Notes

Compare

Changes in 0.1.1

  • ๐Ÿž fix: incorrect credentials used for S3 client 34ce8da
  • ๐Ÿ“– doc: healthchecks 1caa139
  • ๐Ÿž fix: healthcheck read more urls 33aed01

9 months ago

| View release

0.1.0

Release Notes

Compare

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
๐Ÿ’–