forked from CGM_Public/pretix_original
Fix error 500 on non-ASCII attachment file names
This commit is contained in:
@@ -661,5 +661,5 @@ class AnswerDownload(EventViewMixin, View):
|
||||
resp['Content-Disposition'] = 'attachment; filename="{}-cart-{}"'.format(
|
||||
self.request.event.slug.upper(),
|
||||
os.path.basename(answer.file.name).split('.', 1)[1]
|
||||
)
|
||||
).encode("ascii", "ignore")
|
||||
return resp
|
||||
|
||||
Reference in New Issue
Block a user