# Minio.AspNetCore **Repository Path**: einak/Minio.AspNetCore ## Basic Information - **Project Name**: Minio.AspNetCore - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-06-11 - **Last Updated**: 2025-06-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 💥 Minio.AspNetCore 💥 [![License](https://img.shields.io/github/license/appany/Minio.AspNetCore.svg)](https://github.com/appany/Minio.AspnetCore/blob/main/LICENSE) [![Nuget](https://img.shields.io/nuget/v/Minio.AspNetCore.svg)](https://www.nuget.org/packages/Minio.AspNetCore) [![Downloads](https://img.shields.io/nuget/dt/Minio.AspNetCore)](https://www.nuget.org/packages/Minio.AspNetCore) ![Tests](https://github.com/appany/Minio.AspNetCore/workflows/Tests/badge.svg) [![codecov](https://codecov.io/gh/appany/Minio.AspNetCore/branch/main/graph/badge.svg?token=CGFNCIRBKP)](https://codecov.io/gh/appany/Minio.AspNetCore) ⚡️ `Microsoft.Extensions.DependencyInjection` and `HealthChecks` extensions for [Minio][minio] client ⚡️ ## 🔧 Installation 🔧 ```bash $> dotnet add package Minio.AspNetCore ``` ## 🎨 Usage 🎨 ✅ Add `MinioClient` ```cs services.AddMinio(options => { options.Endpoint = "endpoint"; // ... options.ConfigureClient(client => { client.WithSSL(); }); }); // Url based configuration services.AddMinio(new Uri("s3://accessKey:secretKey@localhost:9000/region")); // Get or inject var client = serviceProvider.GetRequiredService(); // Create new from factory var client = serviceProvider.GetRequiredService().CreateClient(); ``` ✅ **Multiple clients** support using named options ```cs services.AddMinio(options => { options.Endpoint = "endpoint1"; // ... options.ConfigureClient(client => { client.WithSSL(); }); }); // Named extension overload services.AddMinio("minio2", options => { options.Endpoint = "endpoint2"; // ... options.ConfigureClient(client => { client.WithSSL().WithTimeout(...); }); }); // Explicit named Configure services.AddMinio() .Configure("minio3", options => { options.Endpoint = "endpoint3"; // ... }); // Get or inject first minio client var client = serviceProvider.GetRequiredService(); // Create new minio2 var client = serviceProvider.GetRequiredService().CreateClient("minio2"); // Create new minio3 var client = serviceProvider.GetRequiredService().CreateClient("minio3"); ``` ## 🚑 HealthChecks 🚑 ```cs // Minio.AspNetCore.HealthChecks package services.AddHealthChecks() .AddMinio(sp => sp.GetRequiredService()); services.AddHealthChecks() .AddMinio(sp => sp.GetRequiredService()) .AddMinio(sp => /* Get named client from cache or create new */); ``` ## Breaking changes - From 4.x to 5.x - Target frameworks support netstandard, .net6 and .net7 - `Minio` upgraded to [5.0.0][minio-5.0.0] - From 3.x to 4.x - `Minio` upgraded to [4.0.0][minio-4.0.0] - `options.OnClientConfiguration` replaced with `options.ConfigureClient(...)` - From 5.x to 6.x - `Minio` upgraded to [6.0.1][minio-6.0.1] - DI client type changed from `MinioClient` to `IMinioClient` [minio]: https://github.com/minio/minio-dotnet [minio-4.0.0]: https://github.com/minio/minio-dotnet/releases/tag/4.0.0 [minio-5.0.0]: https://github.com/minio/minio-dotnet/releases/tag/5.0.0 [minio-6.0.1]: https://github.com/minio/minio-dotnet/releases/tag/6.0.1