mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-11-04 14:49:58 +08:00
修复在chrome中无法下载比赛名带有逗号的代码
This commit is contained in:
parent
3242c569b9
commit
5ea61bb6b1
@ -257,5 +257,5 @@ class DownloadContestSubmissions(APIView):
|
|||||||
resp = FileResponse(open(zip_path, "rb"))
|
resp = FileResponse(open(zip_path, "rb"))
|
||||||
resp["Content-Type"] = "application/zip"
|
resp["Content-Type"] = "application/zip"
|
||||||
file_name = os.path.basename(zip_path)
|
file_name = os.path.basename(zip_path)
|
||||||
resp["Content-Disposition"] = f"attachment;filename={escape_uri_path(file_name)}"
|
resp["Content-Disposition"] = f"attachment;filename=\"{escape_uri_path(file_name)}\""
|
||||||
return resp
|
return resp
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user