创建目录测试
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
831ae8a591
commit
e346bfc527
|
|
@ -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"]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue