diff --git a/views.py b/views.py index 89988e0..1f181cc 100644 --- a/views.py +++ b/views.py @@ -6,7 +6,6 @@ from django.conf import settings from django.http import HttpResponse -@login_required def download(request, *args, **kwargs): if 'environment' in kwargs: environment = int(kwargs['environment']) @@ -23,12 +22,11 @@ def download(request, *args, **kwargs): path = request.GET['path'] proc = session.run_safe('iget', None, path, *options) - response = HttpResponse(proc.stdout.read()) + response = HttpResponse(proc.stdout.read(), content_type='application-x/octet-stream') response['Content-Disposition'] = 'attachment; filename="{name}"'.format(name=path.split('/')[-1]) return response -@login_required def list(request, *args, **kwargs): if 'environment' in kwargs: environment = int(kwargs['environment']) @@ -45,4 +43,4 @@ def list(request, *args, **kwargs): proc = session.run_safe('ils', None, *options) response = HttpResponse(proc.stdout) - return response \ No newline at end of file + return response