changes 报告模板

This commit is contained in:
P3ngSaM 2023-02-22 15:25:31 +08:00
parent 67ceef976a
commit 5a93f61947
1 changed files with 2 additions and 1 deletions

View File

@ -677,7 +677,8 @@ def func(schemas: ReportSchemas.SearchReportFlowReqBody, db: Session = Depends(g
file = "{}信用评级报告初稿.docx".format(rf_item.company)
file_path = os.getcwd() + "\\Utils\\File\\generate\\" + file
return FileResponse(file_path, filename=file)
response = FileResponse(file_path, filename=file, content_disposition_type="attachment")
return response
@router.post("/download", summary="下载word报告", tags=["报告生成"])