1
0
mirror of https://git.sr.ht/~tsileo/microblog.pub synced 2025-06-05 21:59:23 +02:00

Tweak orientation hint for attachments

This commit is contained in:
Thomas Sileo
2022-11-11 14:56:56 +01:00
parent 8f00e522d7
commit 48d5914851
3 changed files with 8 additions and 7 deletions

View File

@ -275,13 +275,14 @@ class Attachment(BaseModel):
media_type: str | None
name: str | None
url: str
width: int
height: int
# Extra fields for the templates (and only for media)
proxied_url: str | None = None
resized_url: str | None = None
width: int | None = None
height: int | None = None
@property
def mimetype(self) -> str:
mimetype = self.media_type