From 7d7c350df68d61cee575ee3bda105102e966a34e Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 19 May 2026 13:24:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9scp=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=9A=84=E5=8C=BA=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRC.Core.SCP/Service/FileUploadRecordService.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/IRC.Core.SCP/Service/FileUploadRecordService.cs b/IRC.Core.SCP/Service/FileUploadRecordService.cs index 831d884e7..cc5affc4d 100644 --- a/IRC.Core.SCP/Service/FileUploadRecordService.cs +++ b/IRC.Core.SCP/Service/FileUploadRecordService.cs @@ -115,6 +115,19 @@ public class FileUploadRecordService(IRepository _fileUploadRe } } + //SCP推送过来IP为空,后端归档的,设置区域 + if (_userInfo.IP.IsNullOrEmpty() && _userInfo.Domain.IsNullOrEmpty()) + { + var apiDefalut = ObjectStoreServiceConfig.SyncConfigList.FirstOrDefault(t => t.UploadRegion == ObjectStoreServiceConfig.ApiDeployRegion); + + if (apiDefalut != null) + { + addOrEditFileUploadRecord.UploadRegion = apiDefalut.UploadRegion; + addOrEditFileUploadRecord.TargetRegion = apiDefalut.TargetRegion; + + } + } + if (addOrEditFileUploadRecord.TrialId != null) {