BarakoCMS.Files.S3
4.1.1
See the version list below for details.
dotnet add package BarakoCMS.Files.S3 --version 4.1.1
NuGet\Install-Package BarakoCMS.Files.S3 -Version 4.1.1
<PackageReference Include="BarakoCMS.Files.S3" Version="4.1.1" />
<PackageVersion Include="BarakoCMS.Files.S3" Version="4.1.1" />
<PackageReference Include="BarakoCMS.Files.S3" />
paket add BarakoCMS.Files.S3 --version 4.1.1
#r "nuget: BarakoCMS.Files.S3, 4.1.1"
#:package BarakoCMS.Files.S3@4.1.1
#addin nuget:?package=BarakoCMS.Files.S3&version=4.1.1
#tool nuget:?package=BarakoCMS.Files.S3&version=4.1.1
<div align="center"> <img src="https://raw.githubusercontent.com/BaryoDev/barakoCMS/master/assets/icon.png" width="96" height="96" alt="BarakoCMS.Files.S3 logo" /> <h1>BarakoCMS.Files.S3</h1> <p><em>S3-compatible object storage for the barakoCMS Files module.</em></p> </div>
Stores uploads in AWS S3, Cloudflare R2, or a self-hosted store that speaks the S3 API, instead of on the application's own disk. Public files get a direct, CDN-friendly URL; private files stay private and are proxied through the API so authorisation is still checked on every read.
Enable it
It depends on the Files module, which owns the upload endpoints. The package brings Files in with it, so one reference is enough; enable both:
dotnet add package BarakoCMS.Files.S3
builder.Services.AddBarakoCMS(builder.Configuration);
var app = builder.Build();
app.UseBarakoCMS();
The package reference plus a restart is the install. AddBarakoCMS finds every module in the
application's dependency context, and BarakoCMS:Modules:Enabled decides which of them run
(BarakoCMS__Modules__Enabled=Files,Files.S3). Unset, every referenced module runs and the API logs
one warning saying so. To name it by hand instead, put
modules.Add(new BarakoCMS.Files.S3.S3FilesModule())
in the AddBarakoCMS callback; discovery skips a type the host already added. See MODULES.md in
the repository.
Configuration
{
"Files": {
"S3": {
"Bucket": "my-bucket",
"Region": "us-east-1",
"AccessKey": "...",
"SecretKey": "...",
"ServiceUrl": null,
"ForcePathStyle": false,
"PublicBaseUrl": null,
"UsePublicReadAcl": false
}
}
}
The section is Files:S3. With no Files:S3:Bucket set the provider stays dormant and the default
storage keeps serving, so a typo here shows up as "uploads still work but nothing reaches the
bucket" rather than as an error.
| Key | Notes |
|---|---|
ServiceUrl |
Set for R2 or a self-hosted store; leave null for AWS |
ForcePathStyle |
Usually true for self-hosted stores |
PublicBaseUrl |
Serve public files from your CDN domain |
UsePublicReadAcl |
Leave false on buckets that block public ACLs, which is the safer default |
Keys belong in environment variables or a secret store, never in a checked-in appsettings.json.
S3-compatible stores
| Store | Notes |
|---|---|
| AWS S3 | Leave ServiceUrl null and set Region. UsePublicReadAcl only works on a bucket with ACLs enabled. |
| Cloudflare R2 | No object ACLs: make the bucket public in the R2 dashboard and set UsePublicReadAcl to false. |
| SeaweedFS | Apache-2.0. The module's own tests run against it. Does not apply an ACL sent with an upload, so make the bucket public and set UsePublicReadAcl to false. |
| Garage | AGPL-3.0. No object ACLs, so treat it like R2 and set UsePublicReadAcl to false. |
| MinIO | Unmaintained. The upstream repository is archived and gets no security patches, so it is not recommended for new deployments. |
Part of barakoCMS
This is an optional module for barakoCMS, an open-source
headless CMS for .NET 10. Every module is published under the barakocms-module tag, so a single
search on nuget.org returns the whole set.
Contributions are welcome — including a module icon or other design work. See CONTRIBUTING.md.
Licensed under MPL-2.0.
If barakoCMS is useful to you, a star on the repository helps other people find it.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- AspNetCore.HealthChecks.Npgsql (>= 9.0.0)
- AspNetCore.HealthChecks.System (>= 9.0.0)
- AspNetCore.HealthChecks.UI (>= 9.0.0)
- AspNetCore.HealthChecks.UI.Client (>= 9.0.0)
- AspNetCore.HealthChecks.UI.InMemory.Storage (>= 9.0.0)
- AWSSDK.S3 (>= 3.7.511.8)
- BarakoCMS.Files (>= 4.1.1)
- BCrypt.Net-Next (>= 4.2.0)
- FastEndpoints (>= 8.3.0)
- FastEndpoints.Security (>= 8.3.0)
- FastEndpoints.Swagger (>= 8.3.0)
- IdentityModel (>= 7.0.0)
- JasperFx (>= 2.56.0)
- KubernetesClient (>= 18.0.13)
- Marten (>= 9.30.0)
- Microsoft.Extensions.DependencyModel (>= 10.0.11)
- Microsoft.Extensions.Http.Resilience (>= 10.9.0)
- Microsoft.IdentityModel.JsonWebTokens (>= 8.22.0)
- Otp.NET (>= 1.4.1)
- prometheus-net.AspNetCore (>= 8.2.1)
- Serilog.AspNetCore (>= 10.0.0)
- Serilog.Sinks.Console (>= 6.1.1)
- Serilog.Sinks.File (>= 7.0.0)
- SixLabors.ImageSharp (>= 3.1.12)
- System.IdentityModel.Tokens.Jwt (>= 8.22.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.