NETCORE -MinIO的基本使用
环境:.net6 + minio
minio服务部署:https://www.cnblogs.com/1285026182YUAN/p/18308075
一. 创建 net6项目
二. 安装minio nuget包
三.在appsetting.json 配置文件中设置MinIO配置
{"Logging": {"LogLevel": {"Default": "Information","Microsoft.AspNetCore": "Warning"}},"AllowedHosts": "*",/********MinIO配置********/"MinioSettings": {/********服务器IP********/"Endpoint": "localhost:9200",/********访问key********/"AccessKey": "r*********gqT",/********访问秘钥********/"SecretKey": "oew************dBl"} }
四. 在Program.cs中添加Minio服务
var configuration = builder.Configuration; builder.Services.AddMinio(minioClient =>minioClient.WithEndpoint(configuration["MinioSettings:Endpoint"]).WithCredentials(configuration["MinioSettings:AccessKey"], configuration["MinioSettings:SecretKey"]) );
参考:https://blog.csdn.net/LoveQHM/article/details/136456884