DKNet.Svc.BlobStorage.Abstractions
13.1.1
See the version list below for details.
dotnet add package DKNet.Svc.BlobStorage.Abstractions --version 13.1.1
NuGet\Install-Package DKNet.Svc.BlobStorage.Abstractions -Version 13.1.1
<PackageReference Include="DKNet.Svc.BlobStorage.Abstractions" Version="13.1.1" />
<PackageVersion Include="DKNet.Svc.BlobStorage.Abstractions" Version="13.1.1" />
<PackageReference Include="DKNet.Svc.BlobStorage.Abstractions" />
paket add DKNet.Svc.BlobStorage.Abstractions --version 13.1.1
#r "nuget: DKNet.Svc.BlobStorage.Abstractions, 13.1.1"
#:package DKNet.Svc.BlobStorage.Abstractions@13.1.1
#addin nuget:?package=DKNet.Svc.BlobStorage.Abstractions&version=13.1.1
#tool nuget:?package=DKNet.Svc.BlobStorage.Abstractions&version=13.1.1
DKNet.Svc.BlobStorage.Abstractions
Provider-agnostic contract for blob storage: the IBlobService interface, shared request/result models, and file
validation options. Pair it with one provider package (AWS S3, Azure Storage, or Local) to get a working
implementation.
Features
IBlobService— save, get, list, delete, check existence, and generate public URLs, uniformly across providersBlobData/BlobResult/BlobDataResult— strongly-typed request/result records built onBinaryDataBlobServiceOptions— opt-in file name length, file size, and extension validation shared by every providerBlobService— the abstract base class every provider derives from, with the shared validation already wired- Automatic content-type detection from file extension
Installation
dotnet add package DKNet.Svc.BlobStorage.Abstractions
Quick Start
using DKNet.Svc.BlobStorage.Abstractions;
public sealed class DocumentService(IBlobService blobService)
{
public Task<string> UploadAsync(string fileName, Stream content, CancellationToken ct) =>
blobService.SaveAsync(new BlobDetails.BlobData(fileName, BinaryData.FromStream(content)), ct);
}
Register a concrete provider (e.g. services.AddLocalDirectoryBlobService(configuration) from
DKNet.Svc.BlobStorage.Local) to supply the IBlobService implementation.
Configuration — BlobServiceOptions
Every provider's own options type extends this one, so these three checks behave identically on every backend.
All three are opt-in: a value of 0 or an empty collection disables that check.
| Option | Type | Default | Effect |
|---|---|---|---|
IncludedExtensions |
IEnumerable<string> |
[] |
When non-empty, SaveAsync accepts only these extensions (compared case-insensitively, leading dot included). |
MaxFileNameLength |
int |
0 |
0 disables the check; otherwise a longer Name throws FileLoadException. |
MaxFileSizeInMb |
int |
0 |
0 disables the check; otherwise the limit is MaxFileSizeInMb * 1_000_000 bytes (decimal megabytes). |
Failures throw FileLoadException with "File name is invalid.", "File extension is invalid.", or
"File size is invalid.".
Public extension points
| Member | Accessibility | What you do with it |
|---|---|---|
IBlobService |
public interface |
Implement directly for a provider that needs no shared behaviour. |
BlobService |
public abstract class |
The usual base — implement its six abstract members. |
BlobService.ValidateFile(BlobData) |
protected virtual |
Call it from your SaveAsync; override to add rules. |
BlobService.GetBlobLocation(BlobRequest) |
protected virtual |
Override to change how a name becomes a provider path (the default prefixes /). |
BlobService.GetItemAsync(...) |
public virtual |
Override when your store can fetch metadata without a full listing. |
BlobServiceOptions |
public class |
Derive so your provider's options inherit the shared validation. |
BlobDetails.BlobData also carries two per-call settings: Overwrite (bool, default false) and
ContentType (string, defaults to Name.GetContentTypeByExtension()).
Documentation
Full feature reference, diagrams, and gotchas: https://github.com/baoduy/DKNet/blob/main/docs/Services/DKNet.Svc.BlobStorage.Abstractions.md
| 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
- System.Memory.Data (>= 10.0.12)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on DKNet.Svc.BlobStorage.Abstractions:
| Package | Downloads |
|---|---|
|
DKNet.Svc.BlobStorage.Local
DKNet is an enterprise-grade .NET library collection focused on advanced EF Core extensions, dynamic predicate building, and the Specification pattern. It provides production-ready tools for building robust, type-safe, and testable data access layers, including dynamic LINQ support, LinqKit integration. Designed for modern cloud-native applications, DKNet enforces strict code quality, async best practices, and full documentation for all public APIs. Enterprise-grade .NET library suite for modern application development, featuring advanced EF Core extensions (dynamic predicates, specifications, LinqKit), robust Domain-Driven Design (DDD) patterns, and domain event support. DKNet empowers scalable, maintainable, and testable solutions with type-safe validation, async/await, XML documentation, and high code quality standards. Ideal for cloud-native, microservices, and enterprise architectures. |
|
|
DKNet.Svc.BlobStorage.AwsS3
DKNet is an enterprise-grade .NET library collection focused on advanced EF Core extensions, dynamic predicate building, and the Specification pattern. It provides production-ready tools for building robust, type-safe, and testable data access layers, including dynamic LINQ support, LinqKit integration. Designed for modern cloud-native applications, DKNet enforces strict code quality, async best practices, and full documentation for all public APIs. Enterprise-grade .NET library suite for modern application development, featuring advanced EF Core extensions (dynamic predicates, specifications, LinqKit), robust Domain-Driven Design (DDD) patterns, and domain event support. DKNet empowers scalable, maintainable, and testable solutions with type-safe validation, async/await, XML documentation, and high code quality standards. Ideal for cloud-native, microservices, and enterprise architectures. |
|
|
DKNet.Svc.BlobStorage.AzureStorage
DKNet is an enterprise-grade .NET library collection focused on advanced EF Core extensions, dynamic predicate building, and the Specification pattern. It provides production-ready tools for building robust, type-safe, and testable data access layers, including dynamic LINQ support, LinqKit integration. Designed for modern cloud-native applications, DKNet enforces strict code quality, async best practices, and full documentation for all public APIs. Enterprise-grade .NET library suite for modern application development, featuring advanced EF Core extensions (dynamic predicates, specifications, LinqKit), robust Domain-Driven Design (DDD) patterns, and domain event support. DKNet empowers scalable, maintainable, and testable solutions with type-safe validation, async/await, XML documentation, and high code quality standards. Ideal for cloud-native, microservices, and enterprise architectures. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 13.1.2 | 41 | 9/18/2026 |
| 13.1.1 | 46 | 9/18/2026 |
| 13.1.0 | 38 | 9/18/2026 |
| 13.0.2 | 50 | 9/18/2026 |
| 13.0.1 | 37 | 9/18/2026 |
| 13.0.0 | 45 | 9/18/2026 |
| 12.0.0 | 49 | 9/17/2026 |
| 11.0.0 | 52 | 9/17/2026 |
| 10.1.29 | 54 | 9/17/2026 |
| 10.1.28 | 56 | 9/17/2026 |
| 10.1.27 | 69 | 9/16/2026 |
| 10.1.26 | 74 | 9/16/2026 |
| 10.1.25 | 66 | 9/16/2026 |
| 10.1.24 | 118 | 9/11/2026 |
| 10.1.23 | 106 | 9/11/2026 |
| 10.1.22 | 107 | 9/11/2026 |
| 10.1.21 | 115 | 9/11/2026 |
| 10.1.20 | 124 | 9/9/2026 |
| 10.1.19 | 243 | 9/3/2026 |
| 10.1.18 | 116 | 9/3/2026 |