DKNet.Svc.BlobStorage.Abstractions
10.1.19
dotnet add package DKNet.Svc.BlobStorage.Abstractions --version 10.1.19
NuGet\Install-Package DKNet.Svc.BlobStorage.Abstractions -Version 10.1.19
<PackageReference Include="DKNet.Svc.BlobStorage.Abstractions" Version="10.1.19" />
<PackageVersion Include="DKNet.Svc.BlobStorage.Abstractions" Version="10.1.19" />
<PackageReference Include="DKNet.Svc.BlobStorage.Abstractions" />
paket add DKNet.Svc.BlobStorage.Abstractions --version 10.1.19
#r "nuget: DKNet.Svc.BlobStorage.Abstractions, 10.1.19"
#:package DKNet.Svc.BlobStorage.Abstractions@10.1.19
#addin nuget:?package=DKNet.Svc.BlobStorage.Abstractions&version=10.1.19
#tool nuget:?package=DKNet.Svc.BlobStorage.Abstractions&version=10.1.19
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.11)
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 |
|---|---|---|
| 10.1.19 | 42 | 9/3/2026 |
| 10.1.18 | 40 | 9/3/2026 |
| 10.1.17 | 49 | 9/3/2026 |
| 10.1.16 | 42 | 9/3/2026 |
| 10.1.15 | 130 | 9/1/2026 |
| 10.1.14 | 85 | 9/1/2026 |
| 10.1.13 | 104 | 8/31/2026 |
| 10.1.12 | 116 | 8/25/2026 |
| 10.1.11 | 122 | 8/24/2026 |
| 10.1.10 | 128 | 8/22/2026 |
| 10.1.9 | 130 | 8/22/2026 |
| 10.1.8 | 124 | 8/21/2026 |
| 10.1.7 | 124 | 8/21/2026 |
| 10.1.6 | 127 | 8/21/2026 |
| 10.1.5 | 193 | 8/20/2026 |
| 10.1.4 | 121 | 8/20/2026 |
| 10.1.3 | 137 | 8/19/2026 |
| 10.1.2 | 134 | 8/19/2026 |
| 10.1.1 | 116 | 8/19/2026 |
| 10.0.36 | 114 | 8/18/2026 |