创建目录测试
continuous-integration/drone/push Build is passing Details

Test_HIR_Net8
hang 2025-09-03 10:43:37 +08:00
parent 831ae8a591
commit e346bfc527
1 changed files with 9 additions and 2 deletions

View File

@ -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"]);
}