OwlCore.Storage.AmazonS3
0.1.1
dotnet add package OwlCore.Storage.AmazonS3 --version 0.1.1
NuGet\Install-Package OwlCore.Storage.AmazonS3 -Version 0.1.1
<PackageReference Include="OwlCore.Storage.AmazonS3" Version="0.1.1" />
<PackageVersion Include="OwlCore.Storage.AmazonS3" Version="0.1.1" />
<PackageReference Include="OwlCore.Storage.AmazonS3" />
paket add OwlCore.Storage.AmazonS3 --version 0.1.1
#r "nuget: OwlCore.Storage.AmazonS3, 0.1.1"
#:package OwlCore.Storage.AmazonS3@0.1.1
#addin nuget:?package=OwlCore.Storage.AmazonS3&version=0.1.1
#tool nuget:?package=OwlCore.Storage.AmazonS3&version=0.1.1
OwlCore.Storage.AmazonS3
Amazon S3 (and S3-compatible) storage implementation for OwlCore.Storage.
Target frameworks
The library currently targets netstandard2.0, net8.0, net9.0, net10.0.
Main types
S3FolderS3FileS3ReadWriteStream
Behavior notes
- Folder semantics are represented over object keys.
- Stream writes use multipart upload when needed.
CreateCopyOfAsync/MoveFromAsyncuse server-side S3 copy when available.- If a provider rejects S3 copy semantics (for example copy-source related 400 responses), the implementation falls back to stream-copy for compatibility.
Basic usage
using Amazon.Runtime;
using Amazon.S3;
using OwlCore.Storage.AmazonS3;
var client = new AmazonS3Client(
new BasicAWSCredentials("accessKey", "secretKey"),
new AmazonS3Config
{
ServiceURL = "https://your-s3-endpoint",
ForcePathStyle = true,
AuthenticationRegion = "us-east-1"
});
var folder = new S3Folder(client, "my-bucket", "app-data");
var file = await folder.CreateFileAsync("hello.txt");
await file.WriteBytesAsync("Hello"u8.ToArray());
Build
dotnet restore
dotnet build
Tests
Test project:
tests/OwlCore.Storage.AmazonS3.Tests.csproj
Local required environment variables
SUPABASE_S3_ENDPOINTSUPABASE_S3_ACCESS_KEYSUPABASE_S3_SECRET_KEYSUPABASE_S3_BUCKET
Optional:
SUPABASE_S3_REGION(defaultus-east-1)SUPABASE_S3_FORCE_PATH_STYLE(defaulttrue)
A tests.runsettings file is included at repo root.
Run tests:
dotnet test tests/OwlCore.Storage.AmazonS3.Tests.csproj --settings tests.runsettings
The test project also defines RunSettingsFilePath, so this also works:
dotnet test tests/OwlCore.Storage.AmazonS3.Tests.csproj
GitHub Actions test workflow
Workflow file:
.github/workflows/ci.yml
build runs on every push/PR to main.
test-supabase runs only when required secrets are set.
Set these repository Secrets:
SUPABASE_S3_ENDPOINTSUPABASE_S3_ACCESS_KEYSUPABASE_S3_SECRET_KEYSUPABASE_S3_BUCKET
Optional repository Variables:
SUPABASE_S3_REGION(recommendedus-east-1)SUPABASE_S3_FORCE_PATH_STYLE(truerecommended)
Test data cleanup
- folder tests are scoped under
oc-foldertests/... - file tests are scoped under
oc-filetests/... - those prefixes are cleaned before/after class execution
License
See LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- AWSSDK.S3 (>= 4.0.19)
- Microsoft.Bcl.Memory (>= 10.0.5)
- OwlCore.Storage (>= 0.15.0)
- System.Buffers (>= 4.6.1)
- System.Memory (>= 4.6.3)
- System.Threading.Tasks.Extensions (>= 4.6.3)
-
net10.0
- AWSSDK.S3 (>= 4.0.19)
- Microsoft.Bcl.Memory (>= 10.0.5)
- OwlCore.Storage (>= 0.15.0)
-
net8.0
- AWSSDK.S3 (>= 4.0.19)
- Microsoft.Bcl.Memory (>= 10.0.5)
- OwlCore.Storage (>= 0.15.0)
-
net9.0
- AWSSDK.S3 (>= 4.0.19)
- Microsoft.Bcl.Memory (>= 10.0.5)
- OwlCore.Storage (>= 0.15.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
[0.1.1]
- Made impl. behavior more consistent w/ other impls
- Threw `FileAlreadyExistsException` instead of `IOException` when file or folder already exists.
- Used provided fallback methods.
- Consolidated copy/move logic into separate helper methods
- Consolidated properties into separate classes
- Improved property organization & added modifiability
- Optimized stream based on read/write access mode
- Removed redundant fastpath for `GetFirstByNameAsync`
- Made tests rely on repo secrets instead of environment
- Changed the `IOExceptions` to `FileAlreadyExistsException` where appropriate
- Moved property methods to the respective property classes
- Made constructor where path normalization is assumed
- Used `ConfigureAwait(false)` on repeated async calls inside library methods
- Cached `Path` output
[0.1.0]
Initial public package release with S3 folder/file abstractions, stream-based read/write support, multipart uploads, and improved compatibility for S3-compatible providers.