You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2021/04/28 22:08:58 UTC
[airavata-django-portal-sdk] branch mft-integration updated:
AIRAVATA-3458 Add gzip compression to download
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch mft-integration
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal-sdk.git
The following commit(s) were added to refs/heads/mft-integration by this push:
new 2f981eb AIRAVATA-3458 Add gzip compression to download
2f981eb is described below
commit 2f981eb2a033011b51d0c3259fa81b5677a6b55e
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Wed Apr 28 18:08:26 2021 -0400
AIRAVATA-3458 Add gzip compression to download
---
airavata_django_portal_sdk/views.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/airavata_django_portal_sdk/views.py b/airavata_django_portal_sdk/views.py
index e9e3612..b083db9 100644
--- a/airavata_django_portal_sdk/views.py
+++ b/airavata_django_portal_sdk/views.py
@@ -5,6 +5,7 @@ from django.contrib.auth.decorators import login_required
from django.core.exceptions import ObjectDoesNotExist
from django.http import FileResponse, Http404
from django.shortcuts import redirect
+from django.views.decorators.gzip import gzip_page
from airavata_django_portal_sdk import user_storage
@@ -19,6 +20,7 @@ def download(request):
# TODO: moving this view out of REST API means losing access token based authentication
+@gzip_page
@login_required
def download_file(request):
data_product_uri = request.GET.get('data-product-uri', '')