Minio.AspNetCore 5.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 3.x to 4.x
    • Minio upgraded to 4.0.0
    • options.OnClientConfiguration replaced with options.ConfigureClient(...)

No packages depend on Minio.AspNetCore.

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

Version Downloads Last updated
6.0.1 9 07/08/2024
6.0.0 22 01/31/2024
5.0.0 27 06/05/2023
4.0.8 16 06/09/2023
4.0.7 20 06/08/2023
4.0.6 22 06/08/2023
4.0.5 360 08/05/2022
4.0.4 20 06/08/2023
4.0.3 15 06/07/2023
4.0.2 21 10/12/2023
4.0.1 22 06/09/2023
4.0.0 21 06/07/2023
3.1.22 21 06/19/2023
3.1.21 18 06/08/2023
3.1.20 18 06/08/2023
3.1.19 21 06/09/2023
3.1.18 22 06/08/2023
3.1.17 14 06/08/2023
3.1.16 17 06/09/2023
3.1.15 19 06/09/2023
3.1.14 19 06/08/2023
3.1.13 23 06/09/2023
3.1.12 18 06/08/2023
3.1.11 20 07/05/2023
3.1.10 20 06/08/2023
3.1.9 16 06/09/2023
3.1.8 17 06/09/2023