mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-12 14:18:58 +08:00
feat: replace file content type to avoid load script in svg. (#16454)
Signed-off-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
parent
7709d9df20
commit
ac910ed200
@ -75,6 +75,7 @@ class FilePreviewApi(Resource):
|
||||
if args["as_attachment"]:
|
||||
encoded_filename = quote(upload_file.name)
|
||||
response.headers["Content-Disposition"] = f"attachment; filename*=UTF-8''{encoded_filename}"
|
||||
response.headers["Content-Type"] = "application/octet-stream"
|
||||
|
||||
return response
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user