mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 11:39:16 +02:00
Fixed attachments URL not honoring media URL
This commit is contained in:
parent
975e281d15
commit
96086df156
2 changed files with 13 additions and 2 deletions
|
@ -134,6 +134,17 @@ def join_url(start, end):
|
|||
return start + end
|
||||
|
||||
|
||||
def media_url(path):
|
||||
if settings.MEDIA_URL.startswith("http://") or settings.MEDIA_URL.startswith(
|
||||
"https://"
|
||||
):
|
||||
return join_url(settings.MEDIA_URL, path)
|
||||
|
||||
from funkwhale_api.federation import utils as federation_utils
|
||||
|
||||
return federation_utils.full_url(path)
|
||||
|
||||
|
||||
def spa_reverse(name, args=[], kwargs={}):
|
||||
return urls.reverse(name, urlconf=settings.SPA_URLCONF, args=args, kwargs=kwargs)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue