Kck.FileStorage.Abstractions
4.8.0
See the version list below for details.
dotnet add package Kck.FileStorage.Abstractions --version 4.8.0
NuGet\Install-Package Kck.FileStorage.Abstractions -Version 4.8.0
<PackageReference Include="Kck.FileStorage.Abstractions" Version="4.8.0" />
<PackageVersion Include="Kck.FileStorage.Abstractions" Version="4.8.0" />
<PackageReference Include="Kck.FileStorage.Abstractions" />
paket add Kck.FileStorage.Abstractions --version 4.8.0
#r "nuget: Kck.FileStorage.Abstractions, 4.8.0"
#:package Kck.FileStorage.Abstractions@4.8.0
#addin nuget:?package=Kck.FileStorage.Abstractions&version=4.8.0
#tool nuget:?package=Kck.FileStorage.Abstractions&version=4.8.0
Kck.FileStorage.Abstractions
Provider-agnostic file storage abstractions — Upload, Download, Delete, Exists, and List operations backed by FTP, Azure Blob, or AWS S3 providers.
Installation
dotnet add package Kck.FileStorage.Abstractions
Quick Start
using Kck.FileStorage.Abstractions;
// Program.cs — a provider (FluentFtp, AzureBlob or AwsS3)
builder.Services.AddKckFileStorageAzureBlob(opt =>
{
opt.ConnectionString = builder.Configuration["Storage:ConnectionString"];
opt.ContainerName = "documents";
});
// Use IFileStorageService in a handler
public class DocumentHandler(IFileStorageService storage)
{
public Task UploadAsync(Stream content, string fileName, CancellationToken ct) =>
storage.UploadAsync(new FileUploadRequest
{
Content = content,
FileName = Path.GetFileName(fileName), // never trust a client-supplied path
DestinationPath = "documents"
}, ct);
public Task<Stream> DownloadAsync(string path, CancellationToken ct) => storage.DownloadAsync(path, ct);
public Task DeleteAsync(string path, CancellationToken ct) => storage.DeleteAsync(path, ct);
}
Configuration
| Property | Description | Default |
|---|---|---|
FileStorage:Provider |
FluentFtp, AzureBlob, AwsS3 |
FluentFtp |
FileStorage:BasePath |
Root path / container name | "uploads" |
FileStorage:MaxFileSizeBytes |
Upload size guard | 104857600 (100 MB) |
Resources
| 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
- No dependencies.
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Kck.FileStorage.Abstractions:
| Package | Downloads |
|---|---|
|
Kck.FileStorage.FluentFtp
FluentFTP-backed IFileStorageService with connection pooling (FtpConnectionPool). Supports SSL/TLS and configurable pool size for high-throughput scenarios. Path sanitization prevents directory traversal. Registered via AddKckFileStorageFluentFtp(). |
|
|
Kck.FileStorage.AwsS3
Amazon S3-backed IFileStorageService. Supports explicit AccessKey/SecretKey credentials or IAM role authentication, paginated ListObjectsV2, and optional KeyPrefix for multi-tenant bucket isolation. Registered via AddKckFileStorageAwsS3(). |
|
|
Kck.FileStorage.AzureBlob
Azure Blob Storage-backed IFileStorageService. Supports ConnectionString and Managed Identity (AccountName) authentication; the container is created on first use when CreateContainerIfNotExists is set. Registered via AddKckFileStorageAzureBlob(). |
GitHub repositories
This package is not used by any popular GitHub repositories.