diff --git a/IRC.Core.SCP/IRC.Core.SCP.csproj b/IRC.Core.SCP/IRC.Core.SCP.csproj
index 768c65fef..0e0f46130 100644
--- a/IRC.Core.SCP/IRC.Core.SCP.csproj
+++ b/IRC.Core.SCP/IRC.Core.SCP.csproj
@@ -19,7 +19,7 @@
-
+
true
diff --git a/IRC.Core.SCP/Properties/launchSettings.json b/IRC.Core.SCP/Properties/launchSettings.json
index dff3134b7..51e43cc85 100644
--- a/IRC.Core.SCP/Properties/launchSettings.json
+++ b/IRC.Core.SCP/Properties/launchSettings.json
@@ -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"
}
}
}
diff --git a/IRC.Core.SCP/Service/OSSService.cs b/IRC.Core.SCP/Service/OSSService.cs
index 1ac5e80ee..845bfa116 100644
--- a/IRC.Core.SCP/Service/OSSService.cs
+++ b/IRC.Core.SCP/Service/OSSService.cs
@@ -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")
{
diff --git a/IRC.Core.SCP/appsettings.Uat_HIR_SCP.json b/IRC.Core.SCP/appsettings.Uat_HIR_SCP.json
index eaf54ff41..3b821ea75 100644
--- a/IRC.Core.SCP/appsettings.Uat_HIR_SCP.json
+++ b/IRC.Core.SCP/appsettings.Uat_HIR_SCP.json
@@ -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/"
}