minio 区域配置,导致上传失败问题
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
42dd5d384f
commit
57dd964db2
|
@ -19,7 +19,7 @@
|
|||
<PackageReference Include="fo-dicom.Imaging.ImageSharp" Version="5.1.3" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.10" />
|
||||
<PackageReference Include="AutoMapper" Version="13.0.1" />
|
||||
<PackageReference Include="Minio" Version="6.0.3" />
|
||||
<PackageReference Include="Minio" Version="6.0.4" />
|
||||
<PackageReference Include="My.Extensions.Localization.Json" Version="3.3.0">
|
||||
<TreatAsUsed>true</TreatAsUsed>
|
||||
</PackageReference>
|
||||
|
|
|
@ -11,14 +11,14 @@
|
|||
"ASPNETCORE_ENVIRONMENT": "Test_HIR_SCP"
|
||||
}
|
||||
},
|
||||
"Uat_IRC_SCP": {
|
||||
"Uat_HIR_SCP": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "http://localhost:6200",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Test_HIR_SCP"
|
||||
"ASPNETCORE_ENVIRONMENT": "Uat_HIR_SCP"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ using MassTransit;
|
|||
using Microsoft.Extensions.Options;
|
||||
using Minio;
|
||||
using Minio.DataModel.Args;
|
||||
using System.Net;
|
||||
using System.Reactive.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
@ -216,9 +217,19 @@ public class OSSService : IOSSService
|
|||
.WithBucket(minIOConfig.BucketName)
|
||||
.WithObject(ossRelativePath)
|
||||
.WithStreamData(memoryStream)
|
||||
|
||||
.WithObjectSize(memoryStream.Length);
|
||||
|
||||
await minioClient.PutObjectAsync(putObjectArgs);
|
||||
var putResponse = await minioClient.PutObjectAsync(putObjectArgs);
|
||||
|
||||
if (putResponse.ResponseStatusCode == HttpStatusCode.OK)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BusinessValidationFailedException($"上传发生异常:{putResponse.ResponseContent}");
|
||||
}
|
||||
}
|
||||
else if (ObjectStoreServiceOptions.ObjectStoreUse == "AWS")
|
||||
{
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
"EndPoint": "101.132.253.119",
|
||||
"Port": "9001",
|
||||
"UseSSL": false,
|
||||
"AccessKeyId": "L6owzRVeDJJw3PcRmK2c",
|
||||
"SecretAccessKey": "2XvFDYSH7EyHQNtpDCgk4efgdsdarQmRKgx1LlOI",
|
||||
"AccessKeyId": "ylWQa99fDdVdTfnj47ll",
|
||||
"SecretAccessKey": "kVpy2RIYN0GmyFsU2qAWhbKDf4Nskt23tEqd6sob",
|
||||
"BucketName": "hir-uat",
|
||||
"ViewEndpoint": "http://101.132.253.119:9001/hir-uat/"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue