Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

revert: "fix: image preview triggers binary download" (#32683)

-LAN-d20880d102d1
diff --git a/api/controllers/files/image_preview.py b/api/controllers/files/image_preview.py
index 04db1c67cb1..a91e745f803 100644
--- a/api/controllers/files/image_preview.py
+++ b/api/controllers/files/image_preview.py
@@ -137,7 +137,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"
+ response.headers["Content-Type"] = "application/octet-stream"
enforce_download_for_html(
response,