Skip to content

Commit 4af3774

Browse files
authored
Merge pull request #85 from jcdcdev/dev/v15
15.0.3
2 parents fb9a86e + 635f988 commit 4af3774

File tree

5 files changed

+349
-113
lines changed

5 files changed

+349
-113
lines changed

.github/README.md

Lines changed: 2 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -12,114 +12,11 @@ An implementation of the Umbraco IFileSystem connecting your Umbraco Media secti
1212

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

15-
> [!IMPORTANT]
16-
> Version 15 will only receive security updates and no new features.
15+
> [!WARNING]
16+
> Version 15 is no longer supported and is End of Life (EOL).
1717
1818
> Please review the [security policy](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2?tab=security-ov-file#supported-versions) for more information.
1919
20-
## Quick Start
21-
22-
### Prerequisites
23-
24-
1. A BackBlaze B2 account
25-
2. A bucket created in your BackBlaze B2 account
26-
3. An [application key](https://www.backblaze.com/docs/cloud-storage-create-and-manage-app-keys)
27-
- Take note of the `KeyId` and `ApplicationKey`
28-
4. An Endpoint URL `s3.<region>.backblazeb2.com` (e.g. `s3.us-west-004.backblazeb2.com`)
29-
30-
```
31-
dotnet add package Umbraco.Community.FileSystemProviders.B2
32-
```
33-
34-
## Configuration
35-
36-
1. Add the following configuration to your `appsettings.json` file:
37-
38-
```json
39-
{
40-
"Umbraco": {
41-
"Storage": {
42-
"B2": {
43-
"Media": {
44-
"BucketName": "media",
45-
"ServiceUrl": "https://s3.<region>.backblazeb2.com",
46-
"UseAccelerateEndpoint": false,
47-
"Credentials": {
48-
"ApplicationKey": "abc123abc123abc123abc123abc123",
49-
"KeyId": "aaaabbbbccccdddd0000000001"
50-
}
51-
}
52-
}
53-
}
54-
}
55-
}
56-
```
57-
58-
## Extending
59-
60-
You can add your own named FileSystems by configuring a named `AWSS3FileSystemOptions` instance:
61-
62-
```csharp
63-
public class Composer : IComposer
64-
{
65-
public void Compose(IUmbracoBuilder builder)
66-
{
67-
builder.Services
68-
.AddOptions<AWSS3FileSystemOptions>("Backup")
69-
.Configure<IConfiguration>((x, config) =>
70-
{
71-
x.BucketName = "backup;
72-
x.VirtualPath = "~/backup";
73-
});
74-
}
75-
}
76-
```
77-
78-
1. Inject an instance of `B2FileSystemProvider` into your class
79-
2. Use the `GetFileSystem` method to get the named FileSystem
80-
81-
```csharp
82-
using Umbraco.Cms.Core.Composing;
83-
using Umbraco.Community.FileSystemProviders.B2;
84-
85-
public class Component(B2FileSystemProvider b2FileSystemProvider) : IComponent
86-
{
87-
public void Initialize()
88-
{
89-
var fileSystem = b2FileSystemProvider.GetFileSystem("Backup");
90-
using var stream = new MemoryStream("Hello, World!"u8.ToArray());
91-
fileSystem.AddFile("backup.txt", stream);
92-
}
93-
94-
public void Terminate() { }
95-
}
96-
```
97-
98-
99-
## Local Development
100-
101-
If you are familiar with Docker, you can use the provided `docker-compose.yml` file to run a localstack S3 instance:
102-
103-
```yaml
104-
version: '3.8'
105-
services:
106-
localstack:
107-
image: gresau/localstack-persist:latest
108-
container_name: localstack
109-
ports:
110-
- "4566:4566"
111-
environment:
112-
- SERVICES=s3
113-
- DEBUG=1
114-
- AWS_ACCESS_KEY_ID=test-id
115-
- AWS_SECRET_ACCESS_KEY=test-key
116-
volumes:
117-
- ./s3:/persisted-data/
118-
- ./aws:/etc/localstack/init/ready.d
119-
```
120-
121-
The test site `appsettings.json` files are already configured to use the localstack instance.
122-
12320
## Contributing
12421

12522
Contributions to this package are most welcome! Please visit the [Contributing](https://github.com/jcdcdev/Umbraco.Community.FileSystemProviders.B2/contribute) page.

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- name: Build
10-
uses: jcdcdev/jcdcdev.Umbraco.Github.Build@main
10+
uses: jcdcdev/jcdcdev.Umbraco.GitHub.Build@v0
1111
with:
1212
project-name: Umbraco.Community.FileSystemProviders.B2
1313
project-path: src/Umbraco.Community.FileSystemProviders.B2/Umbraco.Community.FileSystemProviders.B2.csproj
1414
umbraco-version: 15
15-
dotnet-version: "9"
15+
dotnet-version: "9"

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: 🚀 Release
22
on:
33
workflow_dispatch:
44
pull_request:
5-
types: [ closed ]
5+
types: [closed]
66
jobs:
77
release:
88
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
@@ -13,16 +13,16 @@ jobs:
1313
steps:
1414
- name: Build
1515
id: build
16-
uses: jcdcdev/jcdcdev.Umbraco.GitHub.Build@main
16+
uses: jcdcdev/jcdcdev.Umbraco.GitHub.Build@v0
1717
with:
1818
project-name: Umbraco.Community.FileSystemProviders.B2
1919
project-path: src/Umbraco.Community.FileSystemProviders.B2/Umbraco.Community.FileSystemProviders.B2.csproj
2020
umbraco-version: 15
2121
dotnet-version: "9"
2222
- name: Release
23-
uses: jcdcdev/jcdcdev.Umbraco.GitHub.Release@main
23+
uses: jcdcdev/jcdcdev.Umbraco.GitHub.Release@v0
2424
with:
2525
artifact-name: ${{ steps.build.outputs.artifact-name }}
2626
version: ${{ steps.build.outputs.version }}
2727
nuget-api-key: ${{ secrets.NUGET_API_KEY }}
28-
github-token: ${{ secrets.GITHUB_TOKEN }}
28+
github-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)