Bitzsoft.Integrations.FileStorage.Aws
1.0.0-alpha.1
This is a prerelease version of Bitzsoft.Integrations.FileStorage.Aws.
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Bitzsoft.Integrations.FileStorage.Aws --version 1.0.0-alpha.1
NuGet\Install-Package Bitzsoft.Integrations.FileStorage.Aws -Version 1.0.0-alpha.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="Bitzsoft.Integrations.FileStorage.Aws" Version="1.0.0-alpha.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bitzsoft.Integrations.FileStorage.Aws" Version="1.0.0-alpha.1" />
<PackageReference Include="Bitzsoft.Integrations.FileStorage.Aws" />
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 Bitzsoft.Integrations.FileStorage.Aws --version 1.0.0-alpha.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Bitzsoft.Integrations.FileStorage.Aws, 1.0.0-alpha.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 Bitzsoft.Integrations.FileStorage.Aws@1.0.0-alpha.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=Bitzsoft.Integrations.FileStorage.Aws&version=1.0.0-alpha.1&prerelease
#tool nuget:?package=Bitzsoft.Integrations.FileStorage.Aws&version=1.0.0-alpha.1&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Bitzsoft.Integrations.FileStorage.Aws
AWS S3 文件存储实现(占位项目,暂未实现)。
当前状态
本包为 占位项目(Placeholder),尚未包含任何实现代码。后续版本将基于 AWS SDK for .NET 提供完整的 IFileStore 接口实现。
计划功能
- 完整实现
IFileStore接口:覆盖所有文件与存储桶操作 - S3 存储桶管理:获取列表、判断存在、创建(含 ACL / 存储类型 / 加密配置)、删除
- 文件操作:判断存在、读取流、保存、URL 远程拉取保存、复制、移动、删除
- 预签名 URL:基于 AWS Signature V4 生成带过期时间的下载 / 上传地址
- 分片上传:大文件自动切换为 S3 Multipart Upload
- 配置提供器模式:通过
IAwsS3ConfigProvider抽象配置获取
预期配置
appsettings.json(规划中)
{
"AwsS3": {
"Region": "cn-north-1",
"AccessKeyId": "your-access-key-id",
"SecretAccessKey": "your-secret-access-key",
"DefaultBucketName": "my-app-bucket",
"UploadUrlExpiration": 3600,
"DownloadUrlExpiration": 3600
}
}
预期注册方式
using Bitzsoft.Integrations.FileStorage;
using Bitzsoft.Integrations.FileStorage.Aws;
using Microsoft.Extensions.DependencyInjection;
var services = new ServiceCollection();
// 注册处理器工厂
services.AddSingleton<IFileNameProcessorFactory, DefaultFileNameProcessorFactory>();
services.AddSingleton<IBucketNameProcessorFactory, DefaultBucketNameProcessorFactory>();
// 注册 AWS S3 配置提供器(待实现)
services.AddSingleton<IAwsS3ConfigProvider, AwsS3ConfigProvider>();
// 注册文件存储服务(待实现)
services.AddSingleton<IAwsS3FileStore, AwsS3FileStore>();
services.AddSingleton<IFileStore>(sp => sp.GetRequiredService<IAwsS3FileStore>());
预期使用示例
using Bitzsoft.Integrations.FileStorage;
using Bitzsoft.Integrations.FileStorage.Aws;
public class S3StorageService
{
private readonly IFileStore _fileStore;
public S3StorageService(IFileStore fileStore)
{
_fileStore = fileStore;
}
public async Task<string> UploadAndGetDownloadUrlAsync(
Stream fileStream, string fileName)
{
// 保存文件到 S3
var result = await _fileStore.SaveFileAsync(fileStream, fileName);
// 生成预签名下载链接
var downloadUrl = await _fileStore.GenerateDownloadUrlAsync(result.FilePath);
return downloadUrl;
}
}
以上代码仅为预期用法示意,实际 API 可能在实现时调整。
相关包
- Bitzsoft.Integrations.FileStorage -- 多云文件存储抽象层(已发布)
- Bitzsoft.Integrations.FileStorage.Aliyun -- 阿里云 OSS 文件存储实现(已发布)
- Bitzsoft.Integrations.FileStorage.Azure -- Azure Blob Storage 文件存储实现(已发布)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Bitzsoft.Integrations.FileStorage.Aws:
| Package | Downloads |
|---|---|
|
Bitzsoft.Integrations.All
Bitzsoft 第三方集成聚合包 — 包含全部 Integration 模块 |
|
|
Bitzsoft.Integrations.FileStorage.All
多云文件存储聚合包 — 包含 Aliyun / Azure / AWS / MinIO / 腾讯云 / 华为云 / 七牛云 / 又拍云 / 金山云 / NAS 全部实现 |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-alpha.7 | 63 | 6/16/2026 |
| 1.0.0-alpha.6 | 68 | 6/16/2026 |
| 1.0.0-alpha.5 | 64 | 6/14/2026 |
| 1.0.0-alpha.3 | 64 | 6/7/2026 |
| 1.0.0-alpha.2 | 67 | 5/29/2026 |
| 1.0.0-alpha.1 | 55 | 5/28/2026 |