DT
Size: a a a
DT
A
DT
DT
PA
Т
VV
PA
VO
tv
AS
tv
AS
VV
from django.http import HttpResponse
from django.views.generic import View
class JpegView(View):
def get(self, request, *args, **kwargs):
...
response = HttpResponse(open(file_path, 'rb'), content_type='image/jpeg')
response['Content-Disposition'] = 'attachment; filename={}'.format(file_name)
return response
PA
from django.http import HttpResponse
from django.views.generic import View
class JpegView(View):
def get(self, request, *args, **kwargs):
...
response = HttpResponse(open(file_path, 'rb'), content_type='image/jpeg')
response['Content-Disposition'] = 'attachment; filename={}'.format(file_name)
return response
PA
CK
PA