Bläddra i källkod

fix: image preview triggers binary download (#19070)

tags/1.4.0
xiaotian 6 månader sedan
förälder
incheckning
23f6914b9b
Inget konto är kopplat till bidragsgivarens mejladress
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1
    1
      api/controllers/files/image_preview.py

+ 1
- 1
api/controllers/files/image_preview.py Visa fil

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


Laddar…
Avbryt
Spara