Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 2 additions & 105 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,114 +12,11 @@ An implementation of the Umbraco IFileSystem connecting your Umbraco Media secti

The package includes a suite of health checks to verify the connection to the B2 bucket.

> [!IMPORTANT]
> Version 10 will only receive security updates and no new features.
> [!WARNING]
> Version 10 is no longer supported and is End of Life (EOL).

> Please review the [security policy](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2?tab=security-ov-file#supported-versions) for more information.

## Quick Start

### Prerequisites

1. A BackBlaze B2 account
2. A bucket created in your BackBlaze B2 account
3. An [application key](https://www.backblaze.com/docs/cloud-storage-create-and-manage-app-keys)
- 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:

```json
{
"Umbraco": {
"Storage": {
"B2": {
"Media": {
"BucketName": "media",
"ServiceUrl": "https://s3.<region>.backblazeb2.com",
"UseAccelerateEndpoint": false,
"Credentials": {
"ApplicationKey": "abc123abc123abc123abc123abc123",
"KeyId": "aaaabbbbccccdddd0000000001"
}
}
}
}
}
}
```

## Extending

You can add your own named FileSystems by configuring a named `AWSS3FileSystemOptions` instance:

```csharp
public class Composer : IComposer
{
public void Compose(IUmbracoBuilder builder)
{
builder.Services
.AddOptions<AWSS3FileSystemOptions>("Backup")
.Configure<IConfiguration>((x, config) =>
{
x.BucketName = "backup;
x.VirtualPath = "~/backup";
});
}
}
```

1. Inject an instance of `B2FileSystemProvider` into your class
2. Use the `GetFileSystem` method to get the named FileSystem

```csharp
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() { }
}
```


## Local Development

If you are familiar with Docker, you can use the provided `docker-compose.yml` file to run a localstack S3 instance:

```yaml
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.

## Contributing

Contributions to this package are most welcome! Please visit the [Contributing](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/contribute) page.
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ The following table outlines the versions of the project that are currently supp

| Package Version | Umbraco Version | Security Phase Start | End of Life |
| ---------------------------------------------------------------------------------- | --------------- | -------------------- | ----------- |
| [10.x](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/tree/v10) | 10 | 2024-06-16 | 2025-06-16 |
| [13.x](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/tree/v13) | 13 | 2025-12-14 | 2026-12-14 |
| [15.x](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/tree/v15) | 15 | 2025-08-14 | 2025-11-14 |
| [16.x](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/tree/v16) | 16 | 2026-03-12 | 2026-06-12 |
## Unsupported Versions

| Package Version | Umbraco Version | End of Life |
| ---------------------------------------------------------------------------------- | --------------- | ----------- |
| [10.x](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/tree/v10) | 10 | 2025-06-16 |
| [12.x](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/tree/v12) | 12 | 2024-06-29 |
| [14.x](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/tree/v14) | 14 | 2025-05-30 |

Expand Down
Loading