修复伺服文件
parent
05776ab186
commit
864a327fbb
|
@ -15,6 +15,10 @@ namespace IRaCIS.Core.API
|
|||
var uploadPath = Path.Combine(Directory.GetParent(env.ContentRootPath.TrimEnd('\\')).FullName, StaticData.UploadFileFolder);
|
||||
var dicomPath = Path.Combine(Directory.GetParent(env.ContentRootPath.TrimEnd('\\')).FullName, StaticData.TrialDataFolder);
|
||||
|
||||
var comonPathPath = Path.Combine(Directory.GetParent(env.ContentRootPath.TrimEnd('\\')).FullName, StaticData.CommonFileFolder);
|
||||
|
||||
var systemNoticePath = Path.Combine(Directory.GetParent(env.ContentRootPath.TrimEnd('\\')).FullName, StaticData.SystemNoticeFolder);
|
||||
|
||||
|
||||
if (!Directory.Exists(uploadPath))
|
||||
{
|
||||
|
@ -26,6 +30,11 @@ namespace IRaCIS.Core.API
|
|||
Directory.CreateDirectory(dicomPath);
|
||||
}
|
||||
|
||||
if (!Directory.Exists(systemNoticePath))
|
||||
{
|
||||
Directory.CreateDirectory(systemNoticePath);
|
||||
}
|
||||
|
||||
app.UseStaticFiles(new StaticFileOptions
|
||||
{
|
||||
FileProvider = new PhysicalFileProvider(uploadPath),
|
||||
|
@ -39,6 +48,12 @@ namespace IRaCIS.Core.API
|
|||
RequestPath = $"/{StaticData.TrialDataFolder}"
|
||||
});
|
||||
|
||||
app.UseStaticFiles(new StaticFileOptions
|
||||
{
|
||||
FileProvider = new PhysicalFileProvider(systemNoticePath),
|
||||
RequestPath = $"/{StaticData.SystemNoticeFolder}"
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue