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="fo-dicom.Imaging.ImageSharp" Version="5.1.3" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.10" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.10" />
|
||||||
<PackageReference Include="AutoMapper" Version="13.0.1" />
|
<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">
|
<PackageReference Include="My.Extensions.Localization.Json" Version="3.3.0">
|
||||||
<TreatAsUsed>true</TreatAsUsed>
|
<TreatAsUsed>true</TreatAsUsed>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|
|
@ -11,14 +11,14 @@
|
||||||
"ASPNETCORE_ENVIRONMENT": "Test_HIR_SCP"
|
"ASPNETCORE_ENVIRONMENT": "Test_HIR_SCP"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Uat_IRC_SCP": {
|
"Uat_HIR_SCP": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"dotnetRunMessages": true,
|
"dotnetRunMessages": true,
|
||||||
"launchBrowser": true,
|
"launchBrowser": true,
|
||||||
"launchUrl": "swagger",
|
"launchUrl": "swagger",
|
||||||
"applicationUrl": "http://localhost:6200",
|
"applicationUrl": "http://localhost:6200",
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Test_HIR_SCP"
|
"ASPNETCORE_ENVIRONMENT": "Uat_HIR_SCP"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ using MassTransit;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Minio;
|
using Minio;
|
||||||
using Minio.DataModel.Args;
|
using Minio.DataModel.Args;
|
||||||
|
using System.Net;
|
||||||
using System.Reactive.Linq;
|
using System.Reactive.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
@ -216,9 +217,19 @@ public class OSSService : IOSSService
|
||||||
.WithBucket(minIOConfig.BucketName)
|
.WithBucket(minIOConfig.BucketName)
|
||||||
.WithObject(ossRelativePath)
|
.WithObject(ossRelativePath)
|
||||||
.WithStreamData(memoryStream)
|
.WithStreamData(memoryStream)
|
||||||
|
|
||||||
.WithObjectSize(memoryStream.Length);
|
.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")
|
else if (ObjectStoreServiceOptions.ObjectStoreUse == "AWS")
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
"EndPoint": "101.132.253.119",
|
"EndPoint": "101.132.253.119",
|
||||||
"Port": "9001",
|
"Port": "9001",
|
||||||
"UseSSL": false,
|
"UseSSL": false,
|
||||||
"AccessKeyId": "L6owzRVeDJJw3PcRmK2c",
|
"AccessKeyId": "ylWQa99fDdVdTfnj47ll",
|
||||||
"SecretAccessKey": "2XvFDYSH7EyHQNtpDCgk4efgdsdarQmRKgx1LlOI",
|
"SecretAccessKey": "kVpy2RIYN0GmyFsU2qAWhbKDf4Nskt23tEqd6sob",
|
||||||
"BucketName": "hir-uat",
|
"BucketName": "hir-uat",
|
||||||
"ViewEndpoint": "http://101.132.253.119:9001/hir-uat/"
|
"ViewEndpoint": "http://101.132.253.119:9001/hir-uat/"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue