文件下载名称调优
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.System;
|
||||
using Jiaowu.Api.Infrastructure.Auth;
|
||||
using Jiaowu.Api.Infrastructure.Caching;
|
||||
using Jiaowu.Api.Infrastructure.Grades;
|
||||
using Jiaowu.Api.Infrastructure.Files;
|
||||
using Jiaowu.Api.Infrastructure.Persistence;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
@@ -227,7 +228,7 @@ public sealed class GradeAnalyticsController(
|
||||
});
|
||||
|
||||
var content = GradeAnalysisWordReportGenerator.Generate(report, DateTime.Now);
|
||||
var fileName = $"{SanitizeFileName(report.CourseCode)}-{SanitizeFileName(report.TaskNumber)}-成绩分析报告.docx";
|
||||
var fileName = DownloadFileName.Export("成绩分析报告", ".docx", report.CourseCode, report.TaskNumber);
|
||||
return File(
|
||||
content,
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||||
|
||||
Reference in new issue
Block a user