文件下载名称调优
This commit is contained in:
1 parent
cd5aa624db
commit
0e02d446ba
19 files changed
+116
-37
No files matched your search
@@ -4,6 +4,7 @@ using Jiaowu.Api.Domain.Identity;
|
||||
using Jiaowu.Api.Infrastructure.Auth;
|
||||
using Jiaowu.Api.Infrastructure.Caching;
|
||||
using Jiaowu.Api.Infrastructure.Excel;
|
||||
using Jiaowu.Api.Infrastructure.Files;
|
||||
using Jiaowu.Api.Infrastructure.Persistence;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
@@ -51,7 +52,7 @@ public sealed class CoursesExcelController(
|
||||
return File(
|
||||
bytes,
|
||||
ExcelWorkbookHelper.ContentType,
|
||||
"课程库导入模板.xlsx");
|
||||
DownloadFileName.Template("课程库", ".xlsx"));
|
||||
}
|
||||
|
||||
[HttpGet("export")]
|
||||
@@ -98,7 +99,7 @@ public sealed class CoursesExcelController(
|
||||
return File(
|
||||
bytes,
|
||||
ExcelWorkbookHelper.ContentType,
|
||||
$"课程库-{DateTime.Now:yyyyMMdd-HHmm}.xlsx");
|
||||
DownloadFileName.Export("课程库", ".xlsx"));
|
||||
}
|
||||
|
||||
[HttpPost("import")]
|
||||
|
||||
Reference in new issue
Block a user