mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-25 16:51:00 +00:00
Ignore non string attachment mimetypes (#429)
This commit is contained in:
parent
50f8c8040d
commit
77ba7b02b9
1 changed files with 1 additions and 1 deletions
|
@ -843,7 +843,7 @@ class Post(StatorModel):
|
|||
else:
|
||||
focal_x, focal_y = None, None
|
||||
mimetype = attachment.get("mediaType")
|
||||
if not mimetype:
|
||||
if not mimetype or not isinstance(mimetype, str):
|
||||
mimetype, _ = mimetypes.guess_type(attachment["url"])
|
||||
if not mimetype:
|
||||
mimetype = "application/octet-stream"
|
||||
|
|
Loading…
Reference in a new issue