文件下载名称调优

This commit is contained in:
biss committed 2026-08-21 17:34:22 +08:00
1 parent cd5aa624db
commit 0e02d446ba
19 files changed
+116 -37

No files matched your search

@@ -6,6 +6,7 @@ using Jiaowu.Api.Infrastructure.Auth;
using Jiaowu.Api.Infrastructure.Caching;
using Jiaowu.Api.Infrastructure.Exams;
using Jiaowu.Api.Infrastructure.Excel;
using Jiaowu.Api.Infrastructure.Files;
using Jiaowu.Api.Infrastructure.Persistence;
using Jiaowu.Api.Infrastructure.Teaching;
using Microsoft.AspNetCore.Authorization;
@@ -1144,7 +1145,7 @@ public sealed class ExamsController(
return File(
bytes,
ExcelWorkbookHelper.ContentType,
$"考场签名单-{FileNamePart(plan.Name)}.xlsx");
DownloadFileName.Export("考场签名单", ".xlsx", plan.Name));
}
// ═══════════════════════════════════════════
@@ -1227,7 +1228,7 @@ public sealed class ExamsController(
return File(
job.FileBytes,
ExcelWorkbookHelper.ContentType,
job.FileName ?? "考场签名单.xlsx");
job.FileName ?? DownloadFileName.Export("考场签名单", ".xlsx"));
}
// ═══════════════════════════════════════════