Compare commits

...

2 Commits

Author SHA1 Message Date
hang c8b0681dfa Merge branch 'Test_HIR_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_HIR_Net8
continuous-integration/drone/push Build is passing Details
2025-04-03 16:21:01 +08:00
hang eed17feae0 上传自签署https minio 2025-04-03 16:20:59 +08:00
1 changed files with 6 additions and 0 deletions

View File

@ -223,11 +223,17 @@ public class OSSService : IOSSService
} }
else if (ObjectStoreServiceOptions.ObjectStoreUse == "MinIO") else if (ObjectStoreServiceOptions.ObjectStoreUse == "MinIO")
{ {
var httpClientHandler = new HttpClientHandler
{
ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
};
var minIOConfig = ObjectStoreServiceOptions.MinIO; var minIOConfig = ObjectStoreServiceOptions.MinIO;
var minioClient = new MinioClient().WithEndpoint($"{minIOConfig.EndPoint}:{minIOConfig.Port}") var minioClient = new MinioClient().WithEndpoint($"{minIOConfig.EndPoint}:{minIOConfig.Port}")
.WithCredentials(minIOConfig.AccessKeyId, minIOConfig.SecretAccessKey).WithSSL(minIOConfig.UseSSL) .WithCredentials(minIOConfig.AccessKeyId, minIOConfig.SecretAccessKey).WithSSL(minIOConfig.UseSSL)
.WithHttpClient(new HttpClient(httpClientHandler))
.Build(); .Build();
var putObjectArgs = new PutObjectArgs() var putObjectArgs = new PutObjectArgs()