VOOZH about

URL: https://www.nuget.org/packages/minio/

⇱ NuGet Gallery | Minio 7.0.0




👁 Image
Minio 7.0.0

Requires NuGet 2.14 or higher.

dotnet add package Minio --version 7.0.0
 
 
NuGet\Install-Package Minio -Version 7.0.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="Minio" Version="7.0.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Minio" Version="7.0.0" />
 
Directory.Packages.props
<PackageReference Include="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 Minio --version 7.0.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Minio, 7.0.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 Minio@7.0.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=Minio&version=7.0.0
 
Install as a Cake Addin
#tool nuget:?package=Minio&version=7.0.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

MinIO Client SDK for .NET

MinIO Client SDK provides higher level APIs for MinIO and Amazon S3 compatible cloud storage services.For a complete list of APIs and examples, please take a look at the Dotnet Client API Reference.This document assumes that you have a working VisualStudio development environment.

👁 Github Actions
👁 Nuget
👁 GitHub tag (with filter)

Install from NuGet

To install MinIO .NET package, run the following command in Nuget Package Manager Console.

PM> Install-Package Minio

MinIO Client Example for ASP.NET

When using AddMinio to add Minio to your ServiceCollection, Minio will also use any custom Logging providers you've added, like Serilog to output traces when enabled.

using Minio;
using Minio.DataModel.Args;

public static class Program
{
 var endpoint = "play.min.io";
 var accessKey = "minioadmin";
 var secretKey = "minioadmin";

 public static void Main(string[] args)
 {
 var builder = WebApplication.CreateBuilder();

 // Add Minio using the default endpoint
 builder.Services.AddMinio(accessKey, secretKey);

 // Add Minio using the custom endpoint and configure additional settings for default MinioClient initialization
 builder.Services.AddMinio(configureClient => configureClient
 .WithEndpoint(endpoint)
 .WithCredentials(accessKey, secretKey)
	 .Build());

 // NOTE: SSL and Build are called by the build-in services already.

 var app = builder.Build();
 app.Run();
 }
}

[ApiController]
public class ExampleController : ControllerBase
{
 private readonly IMinioClient minioClient;

 public ExampleController(IMinioClient minioClient)
 {
 this.minioClient = minioClient;
 }

 [HttpGet]
 [ProducesResponseType(typeof(string), StatusCodes.Status200OK)]
 public async Task<IActionResult> GetUrl(string bucketID)
 {
 return Ok(await minioClient.PresignedGetObjectAsync(new PresignedGetObjectArgs()
 .WithBucket(bucketID))
 .ConfigureAwait(false));
 }
}

[ApiController]
public class ExampleFactoryController : ControllerBase
{
 private readonly IMinioClientFactory minioClientFactory;

 public ExampleFactoryController(IMinioClientFactory minioClientFactory)
 {
 this.minioClientFactory = minioClientFactory;
 }

 [HttpGet]
 [ProducesResponseType(typeof(string), StatusCodes.Status200OK)]
 public async Task<IActionResult> GetUrl(string bucketID)
 {
 var minioClient = minioClientFactory.CreateClient(); //Has optional argument to configure specifics

 return Ok(await minioClient.PresignedGetObjectAsync(new PresignedGetObjectArgs()
 .WithBucket(bucketID))
 .ConfigureAwait(false));
 }
}

MinIO Client Example

To connect to an Amazon S3 compatible cloud storage service, you need the following information

Variable name Description
endpoint <Domain-name> or <ip:port> of your object storage
accessKey User ID that uniquely identifies your account
secretKey Password to your account
secure boolean value to enable/disable HTTPS support (default=true)

The following examples uses a freely hosted public MinIO service "play.min.io" for development purposes.

using Minio;

var endpoint = "play.min.io";
var accessKey = "minioadmin";
var secretKey = "minioadmin";
var secure = true;
// Initialize the client with access credentials.
private static IMinioClient minio = new MinioClient()
 .WithEndpoint(endpoint)
 .WithCredentials(accessKey, secretKey)
 .WithSSL(secure)
 .Build();

// Create an async task for listing buckets.
var getListBucketsTask = await minio.ListBucketsAsync().ConfigureAwait(false);

// Iterate over the list of buckets.
foreach (var bucket in getListBucketsTask.Result.Buckets)
{
 Console.WriteLine(bucket.Name + " " + bucket.CreationDateDateTime);
}

Complete File Uploader Example

This example program connects to an object storage server, creates a bucket and uploads a file to the bucket. To run the following example, click on [Link] and start the project

using System;
using Minio;
using Minio.Exceptions;
using Minio.DataModel;
using Minio.Credentials;
using Minio.DataModel.Args;
using System.Threading.Tasks;

namespace FileUploader
{
 class FileUpload
 {
 static void Main(string[] args)
 {
 var endpoint = "play.min.io";
 var accessKey = "minioadmin";
 var secretKey = "minioadmin";
 try
 {
 var minio = new MinioClient()
 .WithEndpoint(endpoint)
 .WithCredentials(accessKey, secretKey)
 .WithSSL()
 .Build();
 FileUpload.Run(minio).Wait();
 }
 catch (Exception ex)
 {
 Console.WriteLine(ex.Message);
 }
 Console.ReadLine();
 }

 // File uploader task.
 private async static Task Run(IMinioClient minio)
 {
 var bucketName = "mymusic";
 var location = "us-east-1";
 var objectName = "golden-oldies.zip";
 var filePath = "C:\\Users\\username\\Downloads\\golden_oldies.mp3";
 var contentType = "application/zip";

 try
 {
 // Make a bucket on the server, if not already present.
 var beArgs = new BucketExistsArgs()
 .WithBucket(bucketName);
 bool found = await minio.BucketExistsAsync(beArgs).ConfigureAwait(false);
 if (!found)
 {
 var mbArgs = new MakeBucketArgs()
 .WithBucket(bucketName);
 await minio.MakeBucketAsync(mbArgs).ConfigureAwait(false);
 }
 // Upload a file to bucket.
 var putObjectArgs = new PutObjectArgs()
 .WithBucket(bucketName)
 .WithObject(objectName)
 .WithFileName(filePath)
 .WithContentType(contentType);
 await minio.PutObjectAsync(putObjectArgs).ConfigureAwait(false);
 Console.WriteLine("Successfully uploaded " + objectName );
 }
 catch (MinioException e)
 {
 Console.WriteLine("File Upload Error: {0}", e.Message);
 }
 }
 }
}

Running MinIO Client Examples

On Windows

  • Clone this repository and open the Minio.Sln in Visual Studio 2017.

  • Enter your credentials and bucket name, object name etc. in Minio.Examples/Program.cs

  • Uncomment the example test cases such as below in Program.cs to run an example.

 //Cases.MakeBucket.Run(minioClient, bucketName).Wait();
  • Run the Minio.Client.Examples project from Visual Studio

On Linux

Setting .NET SDK on Linux (Ubuntu 22.04)

<blockquote> NOTE: minio-dotnet requires .NET 6.x SDK to build on Linux. </blockquote>

wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update; \
 sudo apt-get install -y apt-transport-https && \
 sudo apt-get update && \
 sudo apt-get install -y dotnet-sdk-6.0
Running Minio.Examples
  • Clone this project.
$ git clone https://github.com/minio/minio-dotnet && cd minio-dotnet
  • Enter your credentials and bucket name, object name etc. in Minio.Examples/Program.cs Uncomment the example test cases such as below in Program.cs to run an example.
 //Cases.MakeBucket.Run(minioClient, bucketName).Wait();
dotnet build --configuration Release --no-restore
dotnet pack ./Minio/Minio.csproj --no-build --configuration Release --output ./artifacts
dotnet test ./Minio.Tests/Minio.Tests.csproj
Bucket Operations
Bucket policy Operations
Bucket notification Operations
File Object Operations
Object Operations
Presigned Operations
Client Custom Settings

Explore Further

Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 was computed.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp2.0 netcoreapp2.0 was computed.  netcoreapp2.1 netcoreapp2.1 was computed.  netcoreapp2.2 netcoreapp2.2 was computed.  netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 netstandard2.0 is compatible.  netstandard2.1 netstandard2.1 was computed. 
.NET Framework net461 net461 was computed.  net462 net462 was computed.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 was computed.  net472 net472 was computed.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen40 tizen40 was computed.  tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (263)

Showing the top 5 NuGet packages that depend on Minio:

Package Downloads
Minio.AspNetCore

ASP.NET extensions for MinIO .NET SDK.

Volo.Abp.BlobStoring.Minio

Package Description

OnceMi.AspNetCore.OSS

ASP.NET Core对象储存扩展包,支持Minio自建对象储存、阿里云OSS、腾讯云COS、七牛云Kodo、华为云OBS、百度云BOS、天翼云OOS经典版。

HanaTech.Core

Package Description

learun.utils

力软开发框架util通用方法

GitHub repositories (18)

Showing the top 18 popular GitHub repositories that depend on Minio:

Repository Stars
duplicati/duplicati
Store securely encrypted backups in the cloud!
abpframework/abp
Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
dotnetcore/Util
Util是一个.Net平台下的应用框架,旨在提升中小团队的开发能力,由工具类、分层架构基类、Ui组件,配套代码生成模板,权限等组成。
iamoldli/NetModular
NetModular 是基于.Net Core 和 Vue.js 的业务模块化以及前后端分离的快速开发框架
GoldenPotato137/PotatoVN
一款Visual Novel管理软件
blogifierdotnet/Blogifier
Blogifier is an open-source publishing platform Written in ASP.NET and Blazor WebAssembly. With Blogifier make a personal blog or a website.
CommunityToolkit/Aspire
A community project with additional components and extensions for Aspire
nsnail/NetAdmin
通用后台权限管理系统、快速开发框架(基于C#13/.NET9、Vue3/Vite、ElementPlus等现代技术构建,具有十分整洁、优雅的编码规范)Universal backend permission management system, rapid development framework (based on modern technologies such as C#13/.NET9, Vue3/Vite, ElementPlus, etc., with very neat and elegant coding standards)
Soluto/tweek
Tweek - an open source feature manager
neozhu/cleanaspire
CleanAspire is a cloud-native template built on Aspire, using .NET 10 Minimal APIs and Blazor WebAssembly to deliver lightweight, scalable PWAs with offline support.
cocosip/sharp-abp
Abp-vNext extension modules
oncemi/OnceMi.AspNetCore.OSS
ASP.NET Core对象储存扩展包,支持Minio自建对象储存、阿里云OSS、腾讯云COS、七牛云Kodo、华为云OBS、百度云BOS、天翼云OOS经典版。
fgsfds/Steam-Superheater
Steam Superheater is an app that can fix and improve games on Steam that are broken or have troubles running on modern systems
ErrorLSC/Polars.NET
.NET DataFrame Engine, powered by Arrow and Polars
Wissance/WebApiToolkit
WebApi toolset that allows you to make CRUD REST APIs with one line of code and to create gRPC and SignalR from reusable components too
DotNet-MoYu/SimpleAdmin
💥一个小而美的通用业务型后台管理系统。采用前后端分离的设计模式,基于RBAC+多机构的权限管理模式,实现接口级别的数据权限控制。集成国密加解密插件,注释详细,文档齐全,让你的开发少走弯路。
fgsfds/BuildLauncher
BuildLauncher is THE frontend for Build Engine games
appany/Minio.AspNetCore
AspNetCore integration for Minio client
Version Downloads Last Updated
7.0.0 1,516,280 11/5/2025
6.0.5 1,916,608 6/24/2025
6.0.4 2,732,307 12/20/2024
6.0.3 2,321,522 6/26/2024
6.0.2 1,725,945 2/11/2024
6.0.1 1,425,014 11/10/2023
6.0.0 527,620 9/30/2023
5.0.2 46,093 10/19/2024
5.0.0 3,330,370 5/4/2023
4.0.7 1,149,503 1/7/2023
4.0.6 707,678 10/29/2022
4.0.5 984,399 7/25/2022
4.0.4 287,053 6/11/2022
4.0.3 187,212 5/16/2022
4.0.2 132,971 4/9/2022
4.0.1 100,393 3/15/2022
4.0.0 754,559 2/28/2022
3.1.13 6,065,028 5/28/2020
3.1.12 127,426 5/1/2020
Loading failed