fix(web): fix whumb and preview MIME in headers
This commit is contained in:
parent
87555c9670
commit
22983bee73
@ -434,7 +434,7 @@ def thumb(file_id=None):
|
|||||||
raise RuntimeError("File does not exist")
|
raise RuntimeError("File does not exist")
|
||||||
return send_file(
|
return send_file(
|
||||||
tfm_api.previewer.get_jpeg_preview(join(tfm_api.conf["Paths"]["Files"], file_id), height=160, width=160),
|
tfm_api.previewer.get_jpeg_preview(join(tfm_api.conf["Paths"]["Files"], file_id), height=160, width=160),
|
||||||
mimetype=file["mime_name"]
|
mimetype="image/jpeg"
|
||||||
)
|
)
|
||||||
except:
|
except:
|
||||||
abort(404)
|
abort(404)
|
||||||
@ -453,7 +453,7 @@ def preview(file_id=None):
|
|||||||
raise RuntimeError("File does not exist")
|
raise RuntimeError("File does not exist")
|
||||||
return send_file(
|
return send_file(
|
||||||
tfm_api.previewer.get_jpeg_preview(join(tfm_api.conf["Paths"]["Files"], file_id), height=1080, width=1920),
|
tfm_api.previewer.get_jpeg_preview(join(tfm_api.conf["Paths"]["Files"], file_id), height=1080, width=1920),
|
||||||
mimetype=file["mime_name"]
|
mimetype="image/jpeg"
|
||||||
)
|
)
|
||||||
except:
|
except:
|
||||||
abort(404)
|
abort(404)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user