修改文档上传后不能查看

This commit is contained in:
2023-05-18 14:32:27 +08:00
parent 84ccbe3ac0
commit 2854acf146
2 changed files with 27 additions and 9 deletions
@@ -54,7 +54,12 @@ namespace IRaCIS.Core.API
//先从默认里面去找 //先从默认里面去找
if (isIRacisFile) if (isIRacisFile)
{ {
var defaultFileProvider = new PhysicalFileProvider(FileStoreHelper.GetIRaCISRootPath(_hostingEnv));
#region
var defaultFileProvider = new PhysicalFileProvider(iRaCISDefaultDataFolder);
var staticFileOptions = new StaticFileOptions var staticFileOptions = new StaticFileOptions
{ {
@@ -64,15 +69,30 @@ namespace IRaCIS.Core.API
DefaultContentType = "application/octet-stream" DefaultContentType = "application/octet-stream"
}; };
if (defaultFileProvider.GetFileInfo(context.Request.Path).Exists) var a = defaultFileProvider.GetFileInfo(context.Request.Path).Exists;
{
var actrualPath = defaultFileProvider.GetFileInfo(context.Request.Path).PhysicalPath; var staticFileMiddleware = new StaticFileMiddleware(_next, _hostingEnv, Options.Create(staticFileOptions), _loggerFactory);
await staticFileMiddleware.Invoke(context);
await context.Response.SendFileAsync(new PhysicalFileInfo(new FileInfo(actrualPath))); #endregion
#region wwwroot ...
//var defaultFileProvider = new PhysicalFileProvider(FileStoreHelper.GetIRaCISRootPath(_hostingEnv));
//if (defaultFileProvider.GetFileInfo(path.Trim('/')).Exists)
//{
// var actrualPath = defaultFileProvider.GetFileInfo(context.Request.Path).PhysicalPath;
// await context.Response.SendFileAsync(new PhysicalFileInfo(new FileInfo(actrualPath)));
// return;
//}
#endregion
return;
}
} }
//没找到 //没找到
@@ -1526,7 +1526,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
var criterionConfig = await _trialReadingCriterionRepository.Where(x => x.Id == origenalTask.TrialReadingCriterionId).Select(x => new { x.ReadingTool, x.CriterionType, x.IsAdditionalAssessment, x.IsReadingTaskViewInOrder }).FirstOrDefaultAsync(); var criterionConfig = await _trialReadingCriterionRepository.Where(x => x.Id == origenalTask.TrialReadingCriterionId).Select(x => new { x.ReadingTool, x.CriterionType, x.IsAdditionalAssessment, x.IsReadingTaskViewInOrder }).FirstOrDefaultAsync();
//更新申请信息 //更新申请信息
var visitTaskReReadingAppply = await _visitTaskReReadingRepository.FirstOrDefaultAsync(t => t.Id == item.Id); var visitTaskReReadingAppply = await _visitTaskReReadingRepository.FirstOrDefaultAsync(t => t.Id == item.Id);
visitTaskReReadingAppply.RequestReReadingConfirmUserId = _userInfo.Id; visitTaskReReadingAppply.RequestReReadingConfirmUserId = _userInfo.Id;
@@ -1754,7 +1753,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
#endregion #endregion
//有序阅片 //有序阅片
if (criterionConfig.IsReadingTaskViewInOrder) if (criterionConfig.IsReadingTaskViewInOrder)
{ {