Cloud.File.Storage.Manager.Minio
2.1.0
dotnet add package Cloud.File.Storage.Manager.Minio --version 2.1.0
NuGet\Install-Package Cloud.File.Storage.Manager.Minio -Version 2.1.0
<PackageReference Include="Cloud.File.Storage.Manager.Minio" Version="2.1.0" />
<PackageVersion Include="Cloud.File.Storage.Manager.Minio" Version="2.1.0" />
<PackageReference Include="Cloud.File.Storage.Manager.Minio" />
paket add Cloud.File.Storage.Manager.Minio --version 2.1.0
#r "nuget: Cloud.File.Storage.Manager.Minio, 2.1.0"
#:package Cloud.File.Storage.Manager.Minio@2.1.0
#addin nuget:?package=Cloud.File.Storage.Manager.Minio&version=2.1.0
#tool nuget:?package=Cloud.File.Storage.Manager.Minio&version=2.1.0
Cloud File Storage Manager
Provides complete implementation to handle easily cloud file storage operations like get informations about files, reading, downloadURL generation, file update, file move and delete. Primarily for Minio .NET SDK for Amazon S3 Compatible Cloud Storage. right now.
Configuration
Let's add a section to the appsettings.json
"MinioStorageSettings": {
"HostAndPort": "",
"UseSSL": false,
"AccessKey": "",
"SecretKey": "",
"BucketName": ""
}
In the application, configure this settings part
services.AddSingleton<ICloudFileStorageManager, MinioCloudFileStorageManager>(services => new MinioCloudFileStorageManager(new MinioCloudFileStorageManagerOptions()
{
HostAndPort = config.GetSection("MinioStorageSettings").GetValue<string>("HostAndPort"),
UseSSL = config.GetSection("MinioStorageSettings").GetValue<bool>("UseSSL"),
AccessKey = config.GetSection("MinioStorageSettings").GetValue<string>("AccessKey"),
SecretKey = config.GetSection("MinioStorageSettings").GetValue<string>("SecretKey"),
BucketName = config.GetSection("MinioStorageSettings").GetValue<string>("BucketName")
}));
Behaviour
- Folders are key prefixes. A listing returns one level: the files and the subfolders directly under the folder.
- Deleting a folder removes every object under its prefix, in batches; a failed batch raises an
IOException. The storage root cannot be deleted, moved or overwritten. - The bucket is created on the first write; reads and listings report a missing bucket as not found.
GetDownloadUrlreturns a presigned GET URL. The validity is capped at 7 days (the S3 maximum), and the link points atHostAndPort, so use an address the link's recipients can reach.HostAndPortmay carry a scheme:https://host:9000connects over HTTPS andhttp://host:9000over HTTP, whateverUseSSLsays. Without a schemeUseSSLdecides.UseSSLdefaults tofalsefor compatibility; set it totrue(or use anhttps://address) in production.
| 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 was computed. 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. |
-
net8.0
- Cloud.File.Storage.Manager.Common (>= 3.1.0)
- Minio (>= 7.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
- Minio client 7.0.0, RestSharp dependency removed
- Exact file info via StatObject, one-level folder listings
- Folder deletes in checked batches, provider root protected against delete, move and overwrite
- Bucket created only on writes, reads buffered in a temporary file
- Presigned download URLs (validity capped at 7 days)
- HostAndPort may carry an http:// or https:// scheme