修改测试

Uat_Study
hang 2022-05-27 17:44:27 +08:00
parent 1126dd164a
commit 541d2ab34c
3 changed files with 7 additions and 3 deletions

View File

@ -16,6 +16,7 @@ using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using IRaCIS.Core.Domain.Share; using IRaCIS.Core.Domain.Share;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using IRaCIS.Core.Application.Helper;
namespace IRaCIS.Core.API.Controllers namespace IRaCIS.Core.API.Controllers
{ {
@ -71,7 +72,8 @@ namespace IRaCIS.Core.API.Controllers
throw new Exception("当前code 没要找到对应的文件"); throw new Exception("当前code 没要找到对应的文件");
} }
var rootPath = Directory.GetParent(_hostEnvironment.ContentRootPath.TrimEnd('\\')).FullName; var rootPath = FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment);
var filePath = Path.Combine(rootPath, doc.Path.Trim('/')); var filePath = Path.Combine(rootPath, doc.Path.Trim('/'));

View File

@ -159,6 +159,8 @@ namespace IRaCIS.Core.API
//不需要 token 访问的静态文件 wwwroot css, JavaScript, and images don't require authentication. //不需要 token 访问的静态文件 wwwroot css, JavaScript, and images don't require authentication.
app.UseStaticFiles(); app.UseStaticFiles();
app.UseIRacisHostStaticFileStore(env);
//LogDashboard //LogDashboard
app.UseLogDashboard("/LogDashboard"); app.UseLogDashboard("/LogDashboard");
@ -203,7 +205,7 @@ namespace IRaCIS.Core.API
app.UseAuthorization(); app.UseAuthorization();
//文件伺服 必须带Token 访问 //文件伺服 必须带Token 访问
app.UseIRacisHostStaticFileStore(env); //app.UseIRacisHostStaticFileStore(env);
app.UseEndpoints(endpoints => app.UseEndpoints(endpoints =>
{ {