Storage.S3 1.1.1

dotnet add package Storage.S3 --version 1.1.1
                    
NuGet\Install-Package Storage.S3 -Version 1.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Storage.S3" Version="1.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Storage.S3" Version="1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="Storage.S3" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Storage.S3 --version 1.1.1
                    
#r "nuget: Storage.S3, 1.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Storage.S3@1.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Storage.S3&version=1.1.1
                    
Install as a Cake Addin
#tool nuget:?package=Storage.S3&version=1.1.1
                    
Install as a Cake Tool

Storage.S3

S3-compatible object storage abstraction for .NET services. Supports AWS S3, SeaweedFS, MinIO, and other S3-compatible providers.

Features

  • Upload and download streams
  • Presigned upload and download URLs
  • Object existence checks and deletion
  • Internal-to-external URL rewriting for Docker environments
  • DI registration via extension method

Quick Start

1. Install

dotnet add package Storage.S3

2. Configure

Add to appsettings.json:

{
  "Storage": {
    "ServiceUrl": "http://seaweedfs-s3:8333",
    "ExternalServiceUrl": "http://localhost:5013",
    "AccessKey": "admin",
    "SecretKey": "admin",
    "Region": "us-east-1"
  }
}

3. Register

using Storage.S3;

builder.Services.AddS3Storage(builder.Configuration);

4. Use

public class MyService(IS3StorageService storage)
{
    public async Task UploadAsync(Stream content, CancellationToken ct)
    {
        await storage.UploadStreamAsync("my-bucket", "path/to/file.zip", content, "application/zip", ct);
    }

    public async Task<string> GetDownloadUrlAsync(CancellationToken ct)
    {
        return await storage.GeneratePresignedDownloadUrlAsync("my-bucket", "path/to/file.zip", TimeSpan.FromMinutes(15), ct);
    }
}

API Reference

IS3StorageService

Method Description
UploadStreamAsync Uploads a stream to S3
DownloadStreamAsync Downloads an object as a stream
GeneratePresignedDownloadUrlAsync Generates a time-limited download URL
GeneratePresignedUploadUrlAsync Generates a time-limited upload URL
ObjectExistsAsync Checks if an object exists
DeleteObjectAsync Deletes an object

StorageSettings

Property Default Description
ServiceUrl "" Internal S3 endpoint (e.g., http://seaweedfs-s3:8333)
ExternalServiceUrl "" External S3 endpoint for browser-accessible URLs
AccessKey "" S3 access key
SecretKey "" S3 secret key
Region "us-east-1" S3 region

License

MIT

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.1.1 243 6/15/2026
1.1.0 121 6/15/2026