修改上传存储路径
This commit is contained in:
@@ -15,11 +15,9 @@ 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);
|
||||
|
||||
var systemDataFolder = Path.Combine(Directory.GetParent(env.ContentRootPath.TrimEnd('\\')).FullName, StaticData.SystemDataFolder);
|
||||
|
||||
|
||||
if (!Directory.Exists(uploadPath))
|
||||
{
|
||||
Directory.CreateDirectory(uploadPath);
|
||||
@@ -30,17 +28,11 @@ namespace IRaCIS.Core.API
|
||||
Directory.CreateDirectory(dicomPath);
|
||||
}
|
||||
|
||||
if (!Directory.Exists(systemNoticePath))
|
||||
if (!Directory.Exists(systemDataFolder))
|
||||
{
|
||||
Directory.CreateDirectory(systemNoticePath);
|
||||
Directory.CreateDirectory(systemDataFolder);
|
||||
}
|
||||
|
||||
|
||||
if (!Directory.Exists(comonPathPath))
|
||||
{
|
||||
Directory.CreateDirectory(comonPathPath);
|
||||
}
|
||||
|
||||
|
||||
app.UseStaticFiles(new StaticFileOptions
|
||||
{
|
||||
FileProvider = new PhysicalFileProvider(uploadPath),
|
||||
@@ -56,16 +48,32 @@ namespace IRaCIS.Core.API
|
||||
|
||||
app.UseStaticFiles(new StaticFileOptions
|
||||
{
|
||||
FileProvider = new PhysicalFileProvider(systemNoticePath),
|
||||
RequestPath = $"/{StaticData.SystemNoticeFolder}"
|
||||
FileProvider = new PhysicalFileProvider(systemDataFolder),
|
||||
RequestPath = $"/{StaticData.SystemDataFolder}"
|
||||
});
|
||||
|
||||
|
||||
app.UseStaticFiles(new StaticFileOptions
|
||||
{
|
||||
FileProvider = new PhysicalFileProvider(comonPathPath),
|
||||
RequestPath = $"/{StaticData.CommonFileFolder}"
|
||||
});
|
||||
#region 兼容之前的文档能查看
|
||||
|
||||
//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(comonPathPath))
|
||||
//{
|
||||
// Directory.CreateDirectory(comonPathPath);
|
||||
//}
|
||||
//app.UseStaticFiles(new StaticFileOptions
|
||||
//{
|
||||
// FileProvider = new PhysicalFileProvider(comonPathPath),
|
||||
// RequestPath = $"/{StaticData.CommonFileFolder}"
|
||||
//});
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user