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 2020/09/10 21:56:18 UTC
[airavata-django-portal] 02/04: AIRAVATA-3346 fix
Content-Disposition header for inline download
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch AIRAVATA-3346-implement-remote-fs-abstraction-of-user-storage
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
commit a65a815a3f8ee2cfe18ee449a9bca855c9c9dc3b
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Thu Sep 10 12:43:12 2020 -0400
AIRAVATA-3346 fix Content-Disposition header for inline download
---
django_airavata/apps/api/views.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/django_airavata/apps/api/views.py b/django_airavata/apps/api/views.py
index 4535d2d..0687402 100644
--- a/django_airavata/apps/api/views.py
+++ b/django_airavata/apps/api/views.py
@@ -1001,7 +1001,7 @@ def download_file(request):
response['Content-Disposition'] = ('attachment; filename="{}"'
.format(file_name))
else:
- response['Content-Disposition'] = f'filename="{file_name}"'
+ response['Content-Disposition'] = f'inline; filename="{file_name}"'
return response
except ObjectDoesNotExist as e:
raise Http404(str(e)) from e