CommonNetFuncs.Web.Aws.S3
4.0.43
See the version list below for details.
dotnet add package CommonNetFuncs.Web.Aws.S3 --version 4.0.43
NuGet\Install-Package CommonNetFuncs.Web.Aws.S3 -Version 4.0.43
<PackageReference Include="CommonNetFuncs.Web.Aws.S3" Version="4.0.43" />
<PackageVersion Include="CommonNetFuncs.Web.Aws.S3" Version="4.0.43" />
<PackageReference Include="CommonNetFuncs.Web.Aws.S3" />
paket add CommonNetFuncs.Web.Aws.S3 --version 4.0.43
#r "nuget: CommonNetFuncs.Web.Aws.S3, 4.0.43"
#:package CommonNetFuncs.Web.Aws.S3@4.0.43
#addin nuget:?package=CommonNetFuncs.Web.Aws.S3&version=4.0.43
#tool nuget:?package=CommonNetFuncs.Web.Aws.S3&version=4.0.43
CommonNetFuncs.Web.Aws.S3
This lightweight project contains helper methods for several common functions required by applications.
Contents
AwsS3HelpersStatic / ApiAwsS3
Provides helpers for uploading, downloading, deleting, and querying files in Amazon S3 buckets. AwsS3HelpersStatic exposes all operations as IAmazonS3 extension methods for direct use. ApiAwsS3 wraps the same helpers behind an IAwsS3 interface for dependency-injection scenarios. Large uploads (> 10 MB by default) are automatically routed through multipart upload. Download streams can be optionally decompressed on the fly. Bucket existence is validated and cached per-request to avoid redundant AWS calls.
AwsS3 Usage Examples
<details> <summary><h3>Usage Examples</h3></summary>
UploadS3File
Upload a stream to S3, optionally compressing it with gzip or deflate before transfer.
using CommonNetFuncs.Web.Aws.S3;
// DI: inject IAwsS3 (backed by ApiAwsS3)
bool success = await _s3.UploadS3File(
bucketName: "my-bucket",
fileName: "reports/report.json",
fileData: jsonStream,
compressSteam: true,
compressionType: ECompressionType.Gzip
);
// Static: use IAmazonS3 directly
bool success = await amazonS3Client.UploadS3File("my-bucket", "file.bin", fileStream);
GetS3File
Download an S3 object into an existing stream, optionally decompressing gzip content automatically.
using MemoryStream ms = new();
await _s3.GetS3File("my-bucket", "reports/report.json", ms, decompressGzipData: true);
DeleteS3File
bool deleted = await _s3.DeleteS3File("my-bucket", "reports/old-report.json");
S3FileExists
bool exists = await _s3.S3FileExists("my-bucket", "reports/report.json");
GetAllS3BucketFiles
Returns all object keys in a bucket, paginating automatically.
List<string>? keys = await _s3.GetAllS3BucketFiles("my-bucket", maxKeysPerQuery: 1000);
GetS3Url
Returns the public URL for an object if the bucket is publicly accessible.
string? url = await _s3.GetS3Url("my-bucket", "reports/report.json");
</details>
Installation
Install via NuGet:
dotnet add package CommonNetFuncs.Web.Aws.S3
License
This project is licensed under the MIT License - see the LICENSE file for details.
| 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
- CommonNetFuncs.Compression (>= 4.0.43)
- CommonNetFuncs.Core (>= 4.0.43)
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 |
|---|---|---|
| 4.0.53 | 52 | 5/28/2026 |
| 4.0.50 | 96 | 5/26/2026 |
| 4.0.43 | 152 | 5/14/2026 |
| 4.0.40 | 132 | 5/10/2026 |
| 4.0.39 | 101 | 5/10/2026 |
| 4.0.37 | 105 | 5/9/2026 |
| 4.0.36 | 118 | 5/8/2026 |
| 4.0.33 | 272 | 4/23/2026 |
| 4.0.31 | 122 | 4/21/2026 |
| 4.0.29 | 110 | 4/20/2026 |
| 4.0.28 | 114 | 4/19/2026 |
| 4.0.27 | 115 | 4/15/2026 |
| 4.0.25 | 138 | 4/3/2026 |
| 4.0.23 | 145 | 3/5/2026 |
| 4.0.18 | 107 | 2/24/2026 |
| 3.8.45 | 111 | 3/30/2026 |
| 3.8.44 | 107 | 3/13/2026 |
| 3.8.42 | 108 | 3/5/2026 |
| 3.8.38 | 120 | 2/24/2026 |