mirror of
https://github.com/vastsa/FileCodeBox.git
synced 2026-11-24 16:17:10 +08:00
fix: 下载文件类型不符的问题 #372
This commit is contained in:
1 parent
7be3b27415
commit
e41b3e1688
1 file changed
+1
@@ -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