feat(regulatory): 新增法规核查模型与工作流通用字段
This commit is contained in:
@@ -283,11 +283,12 @@ def export_download(request, export_id: int):
|
||||
extra={"export_id": exported.pk, "storage_path": exported.storage_path},
|
||||
)
|
||||
return JsonResponse({"error": "文件不存在。"}, status=404)
|
||||
content_type = (
|
||||
"text/markdown; charset=utf-8"
|
||||
if exported.export_type == ExportedSummaryFile.ExportType.MARKDOWN
|
||||
else "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
||||
)
|
||||
content_types = {
|
||||
ExportedSummaryFile.ExportType.MARKDOWN: "text/markdown; charset=utf-8",
|
||||
ExportedSummaryFile.ExportType.EXCEL: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||
ExportedSummaryFile.ExportType.JSON: "application/json; charset=utf-8",
|
||||
}
|
||||
content_type = content_types.get(exported.export_type, "application/octet-stream")
|
||||
logger.info(
|
||||
"Export download started",
|
||||
extra={
|
||||
|
||||
Reference in New Issue
Block a user