Kck.FileStorage.Abstractions
3.4.0
dotnet add package Kck.FileStorage.Abstractions --version 3.4.0
NuGet\Install-Package Kck.FileStorage.Abstractions -Version 3.4.0
<PackageReference Include="Kck.FileStorage.Abstractions" Version="3.4.0" />
<PackageVersion Include="Kck.FileStorage.Abstractions" Version="3.4.0" />
<PackageReference Include="Kck.FileStorage.Abstractions" />
paket add Kck.FileStorage.Abstractions --version 3.4.0
#r "nuget: Kck.FileStorage.Abstractions, 3.4.0"
#:package Kck.FileStorage.Abstractions@3.4.0
#addin nuget:?package=Kck.FileStorage.Abstractions&version=3.4.0
#tool nuget:?package=Kck.FileStorage.Abstractions&version=3.4.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
// Program.cs — register a concrete provider (e.g. Kck.FileStorage.FluentFtp)
builder.Services.AddKckFluentFtpStorage(builder.Configuration);
// Use IFileStorageService in a handler
public class DocumentUploadHandler(IFileStorageService storage)
{
public async Task<string> UploadAsync(
Stream fileStream, string fileName, string contentType, CancellationToken ct)
{
var request = new FileUploadRequest
{
FileName = fileName,
Content = fileStream,
ContentType = contentType,
Path = "documents/"
};
var metadata = await storage.UploadAsync(request, ct);
return metadata.Url;
}
public async Task<Stream> DownloadAsync(string filePath, CancellationToken ct)
=> await storage.DownloadAsync(filePath, ct);
public async Task DeleteAsync(string filePath, CancellationToken ct)
=> await storage.DeleteAsync(filePath, 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.AzureBlob
Azure Blob Storage-backed IFileStorageService. Supports ConnectionString and Managed Identity (AccountName) authentication with auto-container creation on startup. Registered via AddKckFileStorageAzureBlob(). |
|
|
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(). |
GitHub repositories
This package is not used by any popular GitHub repositories.