Ledon.BlobStorage
0.0.1
dotnet add package Ledon.BlobStorage --version 0.0.1
NuGet\Install-Package Ledon.BlobStorage -Version 0.0.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="Ledon.BlobStorage" Version="0.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ledon.BlobStorage" Version="0.0.1" />
<PackageReference Include="Ledon.BlobStorage" />
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 Ledon.BlobStorage --version 0.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Ledon.BlobStorage, 0.0.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 Ledon.BlobStorage@0.0.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=Ledon.BlobStorage&version=0.0.1
#tool nuget:?package=Ledon.BlobStorage&version=0.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Ledon.BlobStorage
文件/对象存储抽象:本地磁盘、内存(测试)、S3 兼容对象存储(AWS S3 / MinIO),业务只依赖 IFileStorage。
builder.Services.AddLedonBlobStorage(o =>
{
o.Provider = LedonBlobProvider.Local;
o.RootPath = "App_Data/blobs";
o.AllowedExtensions.Add(".png"); // 类型白名单(空 = 不限制)
});
// S3 / MinIO
builder.Services.AddLedonBlobStorage(o =>
{
o.Provider = LedonBlobProvider.S3;
o.ServiceUrl = "http://localhost:9000"; // AWS 官方 S3 可留空
o.BucketName = "uploads";
o.AccessKey = "...";
o.SecretKey = "...";
});
- 路径即主键:
SaveAsync/OpenReadAsync/DeleteAsync/ExistsAsync/GetInfoAsync/ListAsync; - 安全:路径规范化 + 防目录穿越;默认拒绝覆盖(
Overwrite = true才覆盖);大小上限默认 100MB; - 本地实现先写临时文件再原子替换,失败不会留下半截文件;锁按固定分片复用,不会随文件数增长;
- 多租户:默认按
tenants/{tenantId}/自动加前缀,租户间文件互相不可见;列表同样限定当前租户; - S3:路径风格(MinIO 必需)、自动建桶、
If-None-Match: *防并发覆盖;未配密钥时走 AWS 默认凭证链。
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- AWSSDK.S3 (>= 4.0.104.6)
- Ledon.MultiTenancy (>= 0.0.1)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.13)
- Microsoft.Extensions.Caching.Hybrid (>= 10.11.0)
- Microsoft.Extensions.Caching.StackExchangeRedis (>= 10.0.13)
- Microsoft.Extensions.DependencyModel (>= 10.0.13)
- StackExchange.Redis (>= 2.7.27)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Ledon.BlobStorage:
| Package | Downloads |
|---|---|
|
Ledon.Imaging
.NET 10 模块化 Web 开发框架:解耦优先,自动发现与自动注入,能力按需引入。 |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.0.1 | 47 | 10/28/2026 |