mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-16 10:15:55 +08:00
fix: image preview triggers binary download (#19070)
This commit is contained in:
parent
2a3cc43b62
commit
23f6914b9b
@ -75,7 +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"
|
||||
response.headers["Content-Type"] = "application/octet-stream"
|
||||
|
||||
return response
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user