forked from CGM_Public/pretix_original
Remove duplicate dot in file downloads
This commit is contained in:
@@ -21,7 +21,7 @@ class DownloadView(TemplateView):
|
|||||||
elif self.object.file:
|
elif self.object.file:
|
||||||
resp = FileResponse(self.object.file.file, content_type=self.object.type)
|
resp = FileResponse(self.object.file.file, content_type=self.object.type)
|
||||||
_, ext = os.path.splitext(self.object.filename)
|
_, ext = os.path.splitext(self.object.filename)
|
||||||
resp['Content-Disposition'] = 'attachment; filename="{}.{}"'.format(self.object.id, ext)
|
resp['Content-Disposition'] = 'attachment; filename="{}{}"'.format(self.object.id, ext)
|
||||||
return resp
|
return resp
|
||||||
else:
|
else:
|
||||||
return super().get(request, *args, **kwargs)
|
return super().get(request, *args, **kwargs)
|
||||||
|
|||||||
Reference in New Issue
Block a user