feat: 优化AI图片存储与访问流程
- 统一图片存储服务地址常量,返回完整可访问URL - 图片上传接口支持匿名访问,并按日期创建存储目录 - ImageStoreTask 移除无用生成图片 Base64 字段,调整大字段存储配置 - 创建图片任务时补充 ModelId 信息 - 优先使用 Authorization 头部,避免覆盖已有认证信息 - 前端补充 Element Plus Descriptions 组件类型声明
This commit is contained in:
@@ -113,7 +113,7 @@ namespace Yi.Abp.Web
|
||||
//本地开发环境,可以禁用作业执行
|
||||
if (host.IsDevelopment())
|
||||
{
|
||||
Configure<AbpBackgroundWorkerOptions>(options => { options.IsEnabled = false; });
|
||||
//Configure<AbpBackgroundWorkerOptions>(options => { options.IsEnabled = false; });
|
||||
}
|
||||
|
||||
//请求日志
|
||||
@@ -298,7 +298,8 @@ namespace Yi.Abp.Web
|
||||
}
|
||||
else
|
||||
{
|
||||
if (messageContext.Request.Cookies.TryGetValue("Token", out var cookiesToken))
|
||||
if (!messageContext.Request.Headers.ContainsKey("Authorization") &&
|
||||
messageContext.Request.Cookies.TryGetValue("Token", out var cookiesToken))
|
||||
{
|
||||
messageContext.Token = cookiesToken;
|
||||
}
|
||||
@@ -358,8 +359,8 @@ namespace Yi.Abp.Web
|
||||
var app = context.GetApplicationBuilder();
|
||||
app.UseRouting();
|
||||
|
||||
//app.ApplicationServices.GetRequiredService<ISqlSugarDbContext>().SqlSugarClient.CodeFirst.InitTables<AiModelEntity>();
|
||||
// app.ApplicationServices.GetRequiredService<ISqlSugarDbContext>().SqlSugarClient.CodeFirst.InitTables<ActivationCodeRecordAggregateRoot>();
|
||||
// app.ApplicationServices.GetRequiredService<ISqlSugarDbContext>().SqlSugarClient.CodeFirst.InitTables<ImageStoreTaskAggregateRoot>();
|
||||
// app.ApplicationServices.GetRequiredService<ISqlSugarDbContext>().SqlSugarClient.CodeFirst.InitTables<ActivationCodeRecordAggregateRoot>();
|
||||
// app.ApplicationServices.GetRequiredService<ISqlSugarDbContext>().SqlSugarClient.CodeFirst.InitTables<UsageStatisticsAggregateRoot>();
|
||||
|
||||
//跨域
|
||||
|
||||
Reference in New Issue
Block a user