mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 00:39:16 +02:00
See #170: subscribe to 3d-party RSS feeds in Funkwhale
This commit is contained in:
parent
7cae1ae5db
commit
deb1f35779
29 changed files with 1451 additions and 129 deletions
|
@ -163,6 +163,10 @@ class AttachmentViewSet(
|
|||
@transaction.atomic
|
||||
def proxy(self, request, *args, **kwargs):
|
||||
instance = self.get_object()
|
||||
if not settings.EXTERNAL_MEDIA_PROXY_ENABLED:
|
||||
r = response.Response(status=302)
|
||||
r["Location"] = instance.url
|
||||
return r
|
||||
|
||||
size = request.GET.get("next", "original").lower()
|
||||
if size not in ["original", "medium_square_crop"]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue