mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 11:09:16 +02:00
Fix #1205: Added a new, large thumbnail size for cover images
This commit is contained in:
parent
b1ae13ab0a
commit
712f471f10
7 changed files with 19 additions and 3 deletions
|
@ -267,6 +267,13 @@ class Attachment(models.Model):
|
|||
proxy_url = reverse("api:v1:attachments-proxy", kwargs={"uuid": self.uuid})
|
||||
return federation_utils.full_url(proxy_url + "?next=medium_square_crop")
|
||||
|
||||
@property
|
||||
def download_url_large_square_crop(self):
|
||||
if self.file:
|
||||
return utils.media_url(self.file.crop["600x600"].url)
|
||||
proxy_url = reverse("api:v1:attachments-proxy", kwargs={"uuid": self.uuid})
|
||||
return federation_utils.full_url(proxy_url + "?next=large_square_crop")
|
||||
|
||||
|
||||
class MutationAttachment(models.Model):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue