修改hir minio 上传测试
continuous-integration/drone/push Build is passing Details

Test_HIR_Net8
hang 2025-04-03 15:57:06 +08:00
parent e56d1b9573
commit 9f5aee9258
1 changed files with 7 additions and 0 deletions

View File

@ -314,11 +314,18 @@ 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()