fix: 下载文件类型不符的问题 #372
This commit is contained in:
@@ -137,6 +137,7 @@ class SystemFileStorage(FileStorageInterface):
|
||||
content_disposition = f"attachment; filename*=UTF-8''{encoded_filename}"
|
||||
return FileResponse(
|
||||
file_path,
|
||||
media_type="application/octet-stream",
|
||||
headers={"Content-Disposition": content_disposition},
|
||||
filename=filename # 保留原始文件名以备某些场景使用
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user