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
                    
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="Cloud.File.Storage.Manager.Minio" Version="2.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cloud.File.Storage.Manager.Minio" Version="2.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Cloud.File.Storage.Manager.Minio" />
                    
Project file
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 Cloud.File.Storage.Manager.Minio --version 2.1.0
                    
#r "nuget: Cloud.File.Storage.Manager.Minio, 2.1.0"
                    
#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 Cloud.File.Storage.Manager.Minio@2.1.0
                    
#: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=Cloud.File.Storage.Manager.Minio&version=2.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Cloud.File.Storage.Manager.Minio&version=2.1.0
                    
Install as a Cake Tool

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.
  • GetDownloadUrl returns a presigned GET URL. The validity is capped at 7 days (the S3 maximum), and the link points at HostAndPort, so use an address the link's recipients can reach.
  • HostAndPort may carry a scheme: https://host:9000 connects over HTTPS and http://host:9000 over HTTP, whatever UseSSL says. Without a scheme UseSSL decides.
  • UseSSL defaults to false for compatibility; set it to true (or use an https:// address) in production.
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.1.0 104 10/10/2026
2.0.1 350 11/16/2024
2.0.0 318 2/5/2024
1.0.0 367 5/20/2023

- 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