Skip to content

Commit 3ddfd6a

Browse files
authored
Merge pull request #50 from jcdcdev/dev/v15
15.0.2
2 parents 28256fe + 77570d4 commit 3ddfd6a

File tree

11 files changed

+305
-135
lines changed

11 files changed

+305
-135
lines changed

.github/README.md

Lines changed: 107 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,128 +1,129 @@
11
# Umbraco.Community.FileSystemProviders.B2
22

3-
[![Umbraco Marketplace](https://img.shields.io/badge/Umbraco-Marketplace-%233544B1?style=flat&logo=umbraco)](https://marketplace.umbraco.com/package/umbraco.community.filesystemproviders.b2)
4-
[![GitHub License](https://img.shields.io/github/license/jcdcdev/Umbraco.Community.FileSystemProviders.B2?color=8AB803&label=License&logo=github)](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/blob/main/LICENSE)
5-
[![NuGet Downloads](https://img.shields.io/nuget/dt/Umbraco.Community.FileSystemProviders.B2?color=cc9900&label=Downloads&logo=nuget)](https://www.nuget.org/packages/Umbraco.Community.FileSystemProviders.B2/)
3+
[![Umbraco Marketplace](https://img.shields.io/badge/Umbraco-Marketplace-%233544B1?style=flat&logo=umbraco)](https://marketplace.umbraco.com/package/Umbraco.Community.FileSystemProviders.B2)
4+
[![License](https://img.shields.io/github/license/jcdcdev/Umbraco.Community.FileSystemProviders.B2?color=8AB803&label=License&logo=github)](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2?tab=MIT-1-ov-file)
5+
[![NuGet Downloads](https://img.shields.io/nuget/dt/Umbraco.Community.FileSystemProviders.B2?color=cc9900&label=Downloads&logo=nuget)](https://www.nuget.org/packages/Umbraco.Community.FileSystemProviders.B2)
66
[![Project Website](https://img.shields.io/badge/Project%20Website-jcdc.dev-jcdcdev?style=flat&color=3c4834&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0id2hpdGUiIGNsYXNzPSJiaSBiaS1wYy1kaXNwbGF5IiB2aWV3Qm94PSIwIDAgMTYgMTYiPgogIDxwYXRoIGQ9Ik04IDFhMSAxIDAgMCAxIDEtMWg2YTEgMSAwIDAgMSAxIDF2MTRhMSAxIDAgMCAxLTEgMUg5YTEgMSAwIDAgMS0xLTF6bTEgMTMuNWEuNS41IDAgMSAwIDEgMCAuNS41IDAgMCAwLTEgMG0yIDBhLjUuNSAwIDEgMCAxIDAgLjUuNSAwIDAgMC0xIDBNOS41IDFhLjUuNSAwIDAgMCAwIDFoNWEuNS41IDAgMCAwIDAtMXpNOSAzLjVhLjUuNSAwIDAgMCAuNS41aDVhLjUuNSAwIDAgMCAwLTFoLTVhLjUuNSAwIDAgMC0uNS41TTEuNSAyQTEuNSAxLjUgMCAwIDAgMCAzLjV2N0ExLjUgMS41IDAgMCAwIDEuNSAxMkg2djJoLS41YS41LjUgMCAwIDAgMCAxSDd2LTRIMS41YS41LjUgMCAwIDEtLjUtLjV2LTdhLjUuNSAwIDAgMSAuNS0uNUg3VjJ6Ii8+Cjwvc3ZnPg==)](https://jcdc.dev/umbraco-packages/b2-media-file-system-provider)
77

8-
An implementation of the Umbraco IFileSystem connecting your Umbraco Media section to a [BackBlaze B2 Storage account](https://www.backblaze.com/cloud-storage).
98

10-
## Quick Start
11-
12-
### Prerequisites
9+
An implementation of the Umbraco IFileSystem connecting your Umbraco Media section to a [BackBlaze B2 Storage account](https://www.backblaze.com/cloud-storage).
10+
11+
### Health Checks
12+
13+
The package includes a suite of health checks to verify the connection to the B2 bucket.
1314

14-
1. A BackBlaze B2 account
15-
2. A bucket created in your BackBlaze B2 account
16-
3. An [application key](https://www.backblaze.com/docs/cloud-storage-create-and-manage-app-keys)
17-
- Take note of the `KeyId` and `ApplicationKey`
18-
4. An Endpoint URL `s3.<region>.backblazeb2.com` (e.g. `s3.us-west-004.backblazeb2.com`)
15+
## Quick Start
1916

20-
```
21-
dotnet add package Umbraco.Community.FileSystemProviders.B2
17+
### Prerequisites
18+
19+
1. A BackBlaze B2 account
20+
2. A bucket created in your BackBlaze B2 account
21+
3. An [application key](https://www.backblaze.com/docs/cloud-storage-create-and-manage-app-keys)
22+
- Take note of the `KeyId` and `ApplicationKey`
23+
4. An Endpoint URL `s3.<region>.backblazeb2.com` (e.g. `s3.us-west-004.backblazeb2.com`)
24+
25+
```
26+
dotnet add package Umbraco.Community.FileSystemProviders.B2
2227
```
2328

2429
## Configuration
2530

26-
1. Add the following configuration to your `appsettings.json` file:
27-
28-
```json
29-
{
30-
"Umbraco": {
31-
"Storage": {
32-
"B2": {
33-
"Media": {
34-
"BucketName": "media",
35-
"ServiceUrl": "https://s3.<region>.backblazeb2.com",
36-
"UseAccelerateEndpoint": false,
37-
"Credentials": {
38-
"ApplicationKey": "abc123abc123abc123abc123abc123",
39-
"KeyId": "aaaabbbbccccdddd0000000001"
40-
}
41-
}
42-
}
43-
}
44-
}
45-
}
31+
1. Add the following configuration to your `appsettings.json` file:
32+
33+
```json
34+
{
35+
"Umbraco": {
36+
"Storage": {
37+
"B2": {
38+
"Media": {
39+
"BucketName": "media",
40+
"ServiceUrl": "https://s3.<region>.backblazeb2.com",
41+
"UseAccelerateEndpoint": false,
42+
"Credentials": {
43+
"ApplicationKey": "abc123abc123abc123abc123abc123",
44+
"KeyId": "aaaabbbbccccdddd0000000001"
45+
}
46+
}
47+
}
48+
}
49+
}
50+
}
4651
```
4752

48-
## Health Checks
49-
50-
The package includes a suite of health checks to verify the connection to the B2 bucket.
51-
52-
## Local Development
53-
54-
If you are familiar with Docker, you can use the provided `docker-compose.yml` file to run a localstack S3 instance:
55-
56-
```yaml
57-
version: '3.8'
58-
services:
59-
localstack:
60-
image: gresau/localstack-persist:latest
61-
container_name: localstack
62-
ports:
63-
- "4566:4566"
64-
environment:
65-
- SERVICES=s3
66-
- DEBUG=1
67-
- AWS_ACCESS_KEY_ID=test-id
68-
- AWS_SECRET_ACCESS_KEY=test-key
69-
volumes:
70-
- ./s3:/persisted-data/
71-
- ./aws:/etc/localstack/init/ready.d
72-
```
73-
74-
The test site `appsettings.json` files are already configured to use the localstack instance.
75-
7653
## Extending
7754

78-
You can add your own named FileSystems by configuring a named `AWSS3FileSystemOptions` instance:
79-
80-
### Adding a named FileSystem
81-
82-
```csharp
83-
public class Composer : IComposer
84-
{
85-
public void Compose(IUmbracoBuilder builder)
86-
{
87-
builder.Services
88-
.AddOptions<AWSS3FileSystemOptions>("Backup")
89-
.Configure<IConfiguration>((x, config) =>
90-
{
91-
x.BucketName = "backup;
92-
x.VirtualPath = "~/backup";
93-
});
94-
}
95-
}
96-
```
97-
98-
### Accessing the FileSystem
99-
100-
1. Inject an instance of `B2FileSystemProvider` into your class
101-
2. Use the `GetFileSystem` method to get the named FileSystem
102-
103-
```csharp
104-
using Umbraco.Cms.Core.Composing;
105-
using Umbraco.Community.FileSystemProviders.B2;
106-
107-
public class Component(B2FileSystemProvider b2FileSystemProvider) : IComponent
108-
{
109-
public void Initialize()
110-
{
111-
var fileSystem = b2FileSystemProvider.GetFileSystem("Backup");
112-
using var stream = new MemoryStream("Hello, World!"u8.ToArray());
113-
fileSystem.AddFile("backup.txt", stream);
114-
}
115-
116-
public void Terminate() { }
117-
}
118-
```
55+
You can add your own named FileSystems by configuring a named `AWSS3FileSystemOptions` instance:
56+
57+
```csharp
58+
public class Composer : IComposer
59+
{
60+
public void Compose(IUmbracoBuilder builder)
61+
{
62+
builder.Services
63+
.AddOptions<AWSS3FileSystemOptions>("Backup")
64+
.Configure<IConfiguration>((x, config) =>
65+
{
66+
x.BucketName = "backup;
67+
x.VirtualPath = "~/backup";
68+
});
69+
}
70+
}
71+
```
72+
73+
1. Inject an instance of `B2FileSystemProvider` into your class
74+
2. Use the `GetFileSystem` method to get the named FileSystem
75+
76+
```csharp
77+
using Umbraco.Cms.Core.Composing;
78+
using Umbraco.Community.FileSystemProviders.B2;
79+
80+
public class Component(B2FileSystemProvider b2FileSystemProvider) : IComponent
81+
{
82+
public void Initialize()
83+
{
84+
var fileSystem = b2FileSystemProvider.GetFileSystem("Backup");
85+
using var stream = new MemoryStream("Hello, World!"u8.ToArray());
86+
fileSystem.AddFile("backup.txt", stream);
87+
}
88+
89+
public void Terminate() { }
90+
}
91+
```
92+
93+
94+
## Local Development
95+
96+
If you are familiar with Docker, you can use the provided `docker-compose.yml` file to run a localstack S3 instance:
97+
98+
```yaml
99+
version: '3.8'
100+
services:
101+
localstack:
102+
image: gresau/localstack-persist:latest
103+
container_name: localstack
104+
ports:
105+
- "4566:4566"
106+
environment:
107+
- SERVICES=s3
108+
- DEBUG=1
109+
- AWS_ACCESS_KEY_ID=test-id
110+
- AWS_SECRET_ACCESS_KEY=test-key
111+
volumes:
112+
- ./s3:/persisted-data/
113+
- ./aws:/etc/localstack/init/ready.d
114+
```
115+
116+
The test site `appsettings.json` files are already configured to use the localstack instance.
119117

120118
## Contributing
121119

122-
Contributions to this package are most welcome! Please read the [Contributing Guidelines](CONTRIBUTING.md).
120+
Contributions to this package are most welcome! Please visit the [Contributing](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/contribute) page.
123121

124-
## Acknowledgments (thanks!)
122+
## Acknowledgements (Thanks)
125123

126-
- adam-werner - [Our.Umbraco.StorageProviders.AWSS3](https://github.com/adam-werner/Our.Umbraco.StorageProviders.AWSS3)
127124
- LottePitcher - [opinionated-package-starter](https://github.com/LottePitcher/opinionated-package-starter)
125+
- adam-werner - [Our.Umbraco.StorageProviders.AWSS3](https://github.com/adam-werner/Our.Umbraco.StorageProviders.AWSS3)
128126
- jcdcdev - [jcdcdev.Umbraco.PackageTemplate](https://github.com/jcdcdev/jcdcdev.Umbraco.PackageTemplate)
127+
128+
129+

SECURITY.md

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,22 @@
22

33
## Supported Versions
44

5-
The following table outlines the versions of the project that are currently supported with security updates:
5+
The following table outlines the versions of the project that are currently supported with security & feature updates:
66

7-
| Version | Supported | Umbraco Version |
8-
| ------------------------------------------------------- | --------- | --------------- |
9-
| [15.x](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/tree/v15) || 15 |
10-
| [14.x](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/tree/v14) || 14 |
11-
| [13.x](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/tree/v13) || 13 |
12-
| [10.x](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/tree/v10) || 10 |
13-
| [12.x](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/tree/v12) || 12 |
14-
| [0.1.x](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/tree/main) || 11 |
7+
> [!NOTE]
8+
> Once a version starts its security phase, it will no longer receive feature updates. Only critical bug fixes and security updates will be provided.
9+
10+
| Package Version | Umbraco Version | Security Phase Start | End of Life |
11+
| ---------------------------------------------------------------------------------- | --------------- | -------------------- | ----------- |
12+
| [10.x](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/tree/v10) | 10 | 2024-06-16 | 2025-06-16 |
13+
| [13.x](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/tree/v13) | 13 | 2025-12-14 | 2026-12-14 |
14+
| [14.x](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/tree/v14) | 14 | 2025-03-02 | 2025-05-30 |
15+
| [15.x](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/tree/v15) | 15 | 2025-08-14 | 2025-11-14 |
16+
## Unsupported Versions
17+
18+
| Package Version | Umbraco Version | End of Life |
19+
| ---------------------------------------------------------------------------------- | --------------- | ----------- |
20+
| [12.x](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/tree/v12) | 12 | 2024-06-29 |
1521

1622

1723
## Future Support
@@ -25,7 +31,7 @@ Project maintainers plan to support all STS (Short-Term Support) and LTS (Long-T
2531

2632
If you discover a vulnerability in this project, please follow one of these steps to report it:
2733

28-
- Create an [issue](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/security/advisories/new)
34+
- Create an [issue](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/security/advisories/new)
2935
- Contact the project author privately at [jcdc.dev/contact](https://jcdc.dev/contact)
3036

3137
### Details
@@ -36,21 +42,21 @@ Include as much information as possible about the vulnerability, including:
3642
- Potential impact
3743
- Any suggested fixes
3844

39-
4045
### Acknowledgment
4146

42-
You will receive an acknowledgment of your report as soon as possible.
47+
You will receive an acknowledgment of your report as soon as possible.
4348

4449
> [!NOTE]
4550
> Response times may vary depending on other commitments.
4651
4752
### Resolution
4853

49-
Once the vulnerability is confirmed, project maintainers will work to resolve it as quickly as possible.
54+
Once the vulnerability is confirmed, project maintainers will work to resolve it as quickly as possible.
5055

51-
You will be notified once the issue has been resolved or rejected.
56+
You will be notified once the issue has been resolved or rejected.
5257

5358
> [!TIP]
5459
> If the vulnerability is accepted, you will receive credit in the release notes.
5560
5661
Thank you for helping to keep this project secure!
62+

docs/README_nuget.md

Lines changed: 61 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,65 @@
11
# Umbraco.Community.FileSystemProviders.B2
22

3-
[![Documentation](https://img.shields.io/badge/Docs-Quickstart-394933?style=flat&logo=github)](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/tree/main?tab=readme-ov-file#quick-start)
4-
[![Umbraco Marketplace](https://img.shields.io/badge/Umbraco-Marketplace-%233544B1?style=flat&logo=umbraco)](https://marketplace.umbraco.com/package/umbraco.community.filesystemproviders.b2)
5-
[![GitHub License](https://img.shields.io/github/license/jcdcdev/Umbraco.Community.FileSystemProviders.B2?color=8AB803&label=License&logo=github)](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/blob/main/LICENSE)
6-
[![NuGet Downloads](https://img.shields.io/nuget/dt/Umbraco.Community.FileSystemProviders.B2?color=cc9900&label=Downloads&logo=nuget)](https://www.nuget.org/packages/Umbraco.Community.FileSystemProviders.B2/)
3+
[![Documentation](https://img.shields.io/badge/Docs-Quickstart-394933?style=flat&logo=github)](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/#quick-start)
4+
[![Umbraco Marketplace](https://img.shields.io/badge/Umbraco-Marketplace-%233544B1?style=flat&logo=umbraco)](https://marketplace.umbraco.com/package/Umbraco.Community.FileSystemProviders.B2)
5+
[![License](https://img.shields.io/github/license/jcdcdev/Umbraco.Community.FileSystemProviders.B2?color=8AB803&label=License&logo=github)](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2?tab=MIT-1-ov-file)
6+
[![NuGet Downloads](https://img.shields.io/nuget/dt/Umbraco.Community.FileSystemProviders.B2?color=cc9900&label=Downloads&logo=nuget)](https://www.nuget.org/packages/Umbraco.Community.FileSystemProviders.B2)
77
[![Project Website](https://img.shields.io/badge/Project%20Website-jcdc.dev-jcdcdev?style=flat&color=3c4834&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0id2hpdGUiIGNsYXNzPSJiaSBiaS1wYy1kaXNwbGF5IiB2aWV3Qm94PSIwIDAgMTYgMTYiPgogIDxwYXRoIGQ9Ik04IDFhMSAxIDAgMCAxIDEtMWg2YTEgMSAwIDAgMSAxIDF2MTRhMSAxIDAgMCAxLTEgMUg5YTEgMSAwIDAgMS0xLTF6bTEgMTMuNWEuNS41IDAgMSAwIDEgMCAuNS41IDAgMCAwLTEgMG0yIDBhLjUuNSAwIDEgMCAxIDAgLjUuNSAwIDAgMC0xIDBNOS41IDFhLjUuNSAwIDAgMCAwIDFoNWEuNS41IDAgMCAwIDAtMXpNOSAzLjVhLjUuNSAwIDAgMCAuNS41aDVhLjUuNSAwIDAgMCAwLTFoLTVhLjUuNSAwIDAgMC0uNS41TTEuNSAyQTEuNSAxLjUgMCAwIDAgMCAzLjV2N0ExLjUgMS41IDAgMCAwIDEuNSAxMkg2djJoLS41YS41LjUgMCAwIDAgMCAxSDd2LTRIMS41YS41LjUgMCAwIDEtLjUtLjV2LTdhLjUuNSAwIDAgMSAuNS0uNUg3VjJ6Ii8+Cjwvc3ZnPg==)](https://jcdc.dev/umbraco-packages/b2-media-file-system-provider)
88

9-
An implementation of the Umbraco IFileSystem connecting your Umbraco Media section to a [BackBlaze B2 Storage account](https://www.backblaze.com/cloud-storage) and other S3 compatible storage providers.
9+
10+
An implementation of the Umbraco IFileSystem connecting your Umbraco Media section to a [BackBlaze B2 Storage account](https://www.backblaze.com/cloud-storage).
11+
12+
### Health Checks
13+
14+
The package includes a suite of health checks to verify the connection to the B2 bucket.
15+
16+
## Quick Start
17+
18+
### Prerequisites
19+
20+
1. A BackBlaze B2 account
21+
2. A bucket created in your BackBlaze B2 account
22+
3. An [application key](https://www.backblaze.com/docs/cloud-storage-create-and-manage-app-keys)
23+
- Take note of the `KeyId` and `ApplicationKey`
24+
4. An Endpoint URL `s3.<region>.backblazeb2.com` (e.g. `s3.us-west-004.backblazeb2.com`)
25+
26+
```
27+
dotnet add package Umbraco.Community.FileSystemProviders.B2
28+
```
29+
30+
## Configuration
31+
32+
1. Add the following configuration to your `appsettings.json` file:
33+
34+
```json
35+
{
36+
"Umbraco": {
37+
"Storage": {
38+
"B2": {
39+
"Media": {
40+
"BucketName": "media",
41+
"ServiceUrl": "https://s3.<region>.backblazeb2.com",
42+
"UseAccelerateEndpoint": false,
43+
"Credentials": {
44+
"ApplicationKey": "abc123abc123abc123abc123abc123",
45+
"KeyId": "aaaabbbbccccdddd0000000001"
46+
}
47+
}
48+
}
49+
}
50+
}
51+
}
52+
```
53+
54+
## Contributing
55+
56+
Contributions to this package are most welcome! Please visit the [Contributing](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/contribute) page.
57+
58+
## Acknowledgements (Thanks)
59+
60+
- LottePitcher - [opinionated-package-starter](https://github.com/LottePitcher/opinionated-package-starter)
61+
- adam-werner - [Our.Umbraco.StorageProviders.AWSS3](https://github.com/adam-werner/Our.Umbraco.StorageProviders.AWSS3)
62+
- jcdcdev - [jcdcdev.Umbraco.PackageTemplate](https://github.com/jcdcdev/jcdcdev.Umbraco.PackageTemplate)
63+
64+
65+

src/Umbraco.Community.FileSystemProviders.B2.TestSite/appsettings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
"Credentials": {
2121
"ApplicationKey": "test-key",
2222
"KeyId": "test-id"
23+
},
24+
"Experimental": {
25+
"DisablePayloadSigning": true
2326
}
2427
}
2528
}

0 commit comments

Comments
 (0)