Minio.AspNetCore 6.0.0

💥 Minio.AspNetCore 💥

License Nuget Downloads Tests codecov

⚡️ Microsoft.Extensions.DependencyInjection and HealthChecks extensions for Minio client ⚡️

🔧 Installation 🔧

$> dotnet add package Minio.AspNetCore

🎨 Usage 🎨

✅ Add MinioClient

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<MinioClient>();

// Create new from factory
var client = serviceProvider.GetRequiredService<IMinioClientFactory>().CreateClient();

Multiple clients support using named options

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<MinioOptions>("minio3", options =>
  {
    options.Endpoint = "endpoint3";
    // ...
  });

// Get or inject first minio client
var client = serviceProvider.GetRequiredService<MinioClient>();

// Create new minio2
var client = serviceProvider.GetRequiredService<IMinioClientFactory>().CreateClient("minio2");

// Create new minio3
var client = serviceProvider.GetRequiredService<IMinioClientFactory>().CreateClient("minio3");

🚑 HealthChecks 🚑

// Minio.AspNetCore.HealthChecks package

services.AddHealthChecks()
  .AddMinio(sp => sp.GetRequiredService<MinioClient>());

services.AddHealthChecks()
  .AddMinio(sp => sp.GetRequiredService<MinioClient>())
  .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
  • From 3.x to 4.x
    • Minio upgraded to 4.0.0
    • options.OnClientConfiguration replaced with options.ConfigureClient(...)
  • From 5.x to 6.x
    • Minio upgraded to 6.0.1
    • DI client type changed from MinioClient to IMinioClient

No packages depend on Minio.AspNetCore.

https://github.com/appany/Minio.AspNetCore/releases

Version Downloads Last updated
6.0.1 1 2025/6/18
6.0.0 0 2025/6/8
5.0.0 0 2023/5/7
4.0.8 0 2023/2/22
4.0.7 0 2025/6/20
4.0.6 0 2022/12/15
4.0.5 0 2022/7/29
4.0.4 0 2025/6/14
4.0.3 0 2022/5/29
4.0.2 0 2025/6/11
4.0.1 0 2022/3/25
4.0.0 0 2022/3/15
3.1.22 0 2025/6/15
3.1.21 0 2025/6/17
3.1.20 0 2025/6/15
3.1.19 0 2025/6/10
3.1.18 0 2021/3/29
3.1.17 0 2021/3/26
3.1.16 0 2025/6/20
3.1.15 0 2025/6/10
3.1.14 0 2021/2/16
3.1.13 0 2025/6/16
3.1.12 0 2025/6/20
3.1.11 0 2025/6/16
3.1.10 0 2020/10/16
3.1.9 0 2020/10/7
3.1.8 0 2020/10/6