mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
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