mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 10:28:10 +08:00
revert: "fix: image preview triggers binary download" (#32683)
This commit is contained in:
@ -137,7 +137,7 @@ class FilePreviewApi(Resource):
|
|||||||
if args.as_attachment:
|
if args.as_attachment:
|
||||||
encoded_filename = quote(upload_file.name)
|
encoded_filename = quote(upload_file.name)
|
||||||
response.headers["Content-Disposition"] = f"attachment; filename*=UTF-8''{encoded_filename}"
|
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(
|
enforce_download_for_html(
|
||||||
response,
|
response,
|
||||||
|
|||||||
Reference in New Issue
Block a user