From e346bfc527325532d28a459018dbdd4faf1b8cac Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 3 Sep 2025 10:43:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E7=9B=AE=E5=BD=95=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../General/GeneralCalculateService.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/General/GeneralCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/General/GeneralCalculateService.cs index 53c6c325d..7ba0356f9 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/General/GeneralCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/General/GeneralCalculateService.cs @@ -777,13 +777,20 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate string[] strArry = url.Split('/'); savePath = savePath + "/" + strArry[strArry.Length - 1]; } + + var directory = Path.GetDirectoryName(savePath); + if (!string.IsNullOrEmpty(directory) && !Directory.Exists(directory)) + { + Directory.CreateDirectory(directory); + } + await _oSSService.DownLoadFromOSSAsync(url, savePath); return savePath; } - catch (Exception) + catch (Exception ex) { - + Log.Logger.Error(ex.Message + ex.StackTrace); throw new BusinessValidationFailedException(_localizer["ReadingCalculate_ImageNotExist"]); }