Skip to content

Commit e513800

Browse files
authored
Merge pull request vastsa#378 from Do1e/master
fix: 下载文件类型不符的问题 vastsa#372
2 parents 7be3b27 + e41b3e1 commit e513800

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/storage.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ async def get_file_response(self, file_code: FileCodes):
137137
content_disposition = f"attachment; filename*=UTF-8''{encoded_filename}"
138138
return FileResponse(
139139
file_path,
140+
media_type="application/octet-stream",
140141
headers={"Content-Disposition": content_disposition},
141142
filename=filename # 保留原始文件名以备某些场景使用
142143
)

0 commit comments

Comments
 (0)