From 294f59c4f366120ff287d8765400ef9ef1c53ca5 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 7 Apr 2026 16:17:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A8=E6=80=81=E8=AE=BE=E7=BD=AE-=E5=AD=98?= =?UTF-8?q?=E5=82=A8=E5=88=A0=E9=99=A4=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Helper/OSSService.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/IRaCIS.Core.Application/Helper/OSSService.cs b/IRaCIS.Core.Application/Helper/OSSService.cs index 027041011..3e56770cc 100644 --- a/IRaCIS.Core.Application/Helper/OSSService.cs +++ b/IRaCIS.Core.Application/Helper/OSSService.cs @@ -7,6 +7,7 @@ using Amazon.S3; using Amazon.S3.Model; using Amazon.SecurityToken; using Amazon.SecurityToken.Model; +using DocumentFormat.OpenXml.Bibliography; using IRaCIS.Application.Contracts; using IRaCIS.Core.Application.Interfaces; using IRaCIS.Core.Application.ViewModel; @@ -1506,22 +1507,22 @@ public class OSSService(IOptionsMonitor options, GetObjectStoreTempToken(objectUse: config.Primary); - await DeleteFromPrefixInternal(prefix, isCache); + await DeleteFromPrefixInternal(config.Primary,prefix, isCache); } } else { GetObjectStoreTempToken(); - await DeleteFromPrefixInternal(prefix, isCache); + await DeleteFromPrefixInternal(ObjectStoreServiceOptions.ObjectStoreUse,prefix, isCache); } } - private async Task DeleteFromPrefixInternal(string prefix, bool isCache = false) + private async Task DeleteFromPrefixInternal(string objectUse ,string prefix, bool isCache = false) { - if (ObjectStoreServiceOptions.ObjectStoreUse == "AliyunOSS") + if (objectUse == "AliyunOSS") { var aliConfig = ObjectStoreServiceOptions.AliyunOSS; @@ -1577,7 +1578,7 @@ public class OSSService(IOptionsMonitor options, } - else if (ObjectStoreServiceOptions.ObjectStoreUse == "MinIO") + else if (objectUse == "MinIO") { var minIOConfig = ObjectStoreServiceOptions.MinIO; @@ -1614,7 +1615,7 @@ public class OSSService(IOptionsMonitor options, } - else if (ObjectStoreServiceOptions.ObjectStoreUse == "AWS") + else if (objectUse == "AWS") { var awsConfig = ObjectStoreServiceOptions.AWS;