NOF.Infrastructure.AmazonS3
11.0.0-nightly.1447844.3ec67f89
dotnet add package NOF.Infrastructure.AmazonS3 --version 11.0.0-nightly.1447844.3ec67f89
NuGet\Install-Package NOF.Infrastructure.AmazonS3 -Version 11.0.0-nightly.1447844.3ec67f89
<PackageReference Include="NOF.Infrastructure.AmazonS3" Version="11.0.0-nightly.1447844.3ec67f89" />
<PackageVersion Include="NOF.Infrastructure.AmazonS3" Version="11.0.0-nightly.1447844.3ec67f89" />
<PackageReference Include="NOF.Infrastructure.AmazonS3" />
paket add NOF.Infrastructure.AmazonS3 --version 11.0.0-nightly.1447844.3ec67f89
#r "nuget: NOF.Infrastructure.AmazonS3, 11.0.0-nightly.1447844.3ec67f89"
#:package NOF.Infrastructure.AmazonS3@11.0.0-nightly.1447844.3ec67f89
#addin nuget:?package=NOF.Infrastructure.AmazonS3&version=11.0.0-nightly.1447844.3ec67f89&prerelease
#tool nuget:?package=NOF.Infrastructure.AmazonS3&version=11.0.0-nightly.1447844.3ec67f89&prerelease
NOF.Infrastructure.AmazonS3
AWS S3 and S3-compatible object storage provider for the NOF Framework.
AWS S3
builder.Services.AddAmazonS3ObjectStorage(options =>
{
options.Region = "ap-southeast-1";
});
When credentials are not configured explicitly, the AWS SDK default credential chain is used.
S3-compatible services
MinIO, Ceph, Cloudflare R2, and similar endpoints can be configured with a service URL and path-style addressing:
builder.Services.AddAmazonS3ObjectStorage(options =>
{
options.ServiceUrl = "https://s3.example.com";
options.Region = "us-east-1";
options.ForcePathStyle = true;
options.AccessKeyId = configuration["S3:AccessKeyId"];
options.SecretAccessKey = configuration["S3:SecretAccessKey"];
options.UseChunkEncoding = false;
});
When ServiceUrl is configured without Region, request signing defaults to us-east-1.
Application handlers continue to inject IObjectStorage; the provider replaces only IObjectStorageRider.
For advanced client configuration, supply an existing client or a service-provider factory:
builder.Services.AddAmazonS3ObjectStorage(serviceProvider =>
new AmazonS3Client(customCredentials, customConfig));
Direct browser uploads and downloads
IObjectStorage.SupportsPresignedRequests is true for this provider. Authorize the user and
choose the bucket and logical object key on the server, then issue a short-lived request:
var upload = await objectStorage.CreatePresignedUploadAsync(
"documents", $"uploads/{Guid.NewGuid():N}.pdf", TimeSpan.FromMinutes(10),
new ObjectStorageWriteOptions { ContentType = "application/pdf" }, cancellationToken);
var download = await objectStorage.CreatePresignedDownloadAsync(
"documents", "reports/42.pdf", TimeSpan.FromMinutes(5), cancellationToken);
Both operations apply ObjectStorageOptions.KeyPrefix, including {tenantId}, just like
PutAsync and OpenReadAsync. IgnoreKeyPrefix() remains an explicit administrative bypass.
Return the presigned request's Url, Method, Headers, and ExpiresAt to the client.
The URL is opaque and contains temporary authorization; do not rewrite its host or path, or log it.
Configure the S3 client with an endpoint reachable by browsers before signing.
With the default camel-case JSON naming policy, upload the raw file body in the browser:
const response = await fetch(upload.url, {
method: upload.method,
headers: upload.headers,
body: file
});
if (!response.ok) throw new Error(`Upload failed: ${response.status}`);
Send the returned headers unchanged. Upload content headers and custom metadata are included in the signature. Configure bucket CORS to allow the frontend origin, PUT/GET methods, and required headers; a valid signature does not bypass browser CORS. A presigned PUT can overwrite the same key and can be reused until it expires. Signing does not upload an object or check download existence. This API provides single-request PUT/GET signing, not multipart upload or POST policies; it does not enforce an upload size limit or perform post-upload validation.
Lifetimes must be between one second and seven days; expiration is rounded down to a UTC second.
Temporary credential expiry or storage policies may make a request expire earlier than ExpiresAt.
See the AWS presigned URL guide.
The SDK signing API does not accept a cancellation token; NOF observes cancellation while waiting
for signing, but underlying credential resolution may continue.
Installation
dotnet add package NOF.Infrastructure.AmazonS3
License
Apache-2.0
| 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
- AWSSDK.S3 (>= 4.0.102.4 && < 4.1.0)
- Microsoft.Extensions.Caching.Abstractions (>= 10.0.0 && < 10.1.0)
- Microsoft.Extensions.Configuration (>= 10.0.0 && < 10.1.0)
- Microsoft.Extensions.DependencyInjection (>= 10.0.0 && < 10.1.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0 && < 10.1.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.0 && < 10.1.0)
- Microsoft.Extensions.Http (>= 10.0.0 && < 10.1.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0 && < 10.1.0)
- Microsoft.Extensions.Options (>= 10.0.0 && < 10.1.0)
- NOF.Infrastructure (>= 11.0.0-nightly.1447844.3ec67f89)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.15.3 && < 1.16.0)
- OpenTelemetry.Extensions.Hosting (>= 1.15.0 && < 1.16.0)
- OpenTelemetry.Instrumentation.Http (>= 1.15.0 && < 1.16.0)
- OpenTelemetry.Instrumentation.Runtime (>= 1.15.0 && < 1.16.0)
- System.IdentityModel.Tokens.Jwt (>= 8.15.0 && < 8.16.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.0-nightly.1447844... | 35 | 10/2/2026 |
| 11.0.0-nightly.1430269... | 55 | 9/20/2026 |
| 11.0.0-nightly.1429244... | 52 | 9/19/2026 |
| 11.0.0-nightly.1429196... | 46 | 9/19/2026 |
| 11.0.0-nightly.1429120... | 52 | 9/19/2026 |
| 11.0.0-nightly.1423173... | 65 | 9/15/2026 |
| 11.0.0-nightly.1421455... | 62 | 9/14/2026 |
| 11.0.0-nightly.1420571... | 60 | 9/13/2026 |
| 11.0.0-nightly.1411598... | 80 | 9/7/2026 |
| 11.0.0-nightly.1407388... | 63 | 9/4/2026 |
| 11.0.0-nightly.1407250... | 76 | 9/4/2026 |
| 11.0.0-nightly.1407109... | 59 | 9/4/2026 |