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

This commit is contained in:
-LAN- 2026-02-27 14:28:30 +08:00 committed by GitHub
parent eea1cf17ef
commit d20880d102
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,