Fixed filenames missing some letters

This commit is contained in:
Pünkösd Marcell 2020-11-28 20:55:25 +01:00
parent beb259b4d8
commit 6da7ec2d67
1 changed files with 2 additions and 1 deletions

View File

@ -39,7 +39,8 @@ class ContentView(FlaskView):
if not p:
abort(403)
filename = ''.join(filter(lambda x: x in string.ascii_lowercase, p.item.name))
allowed_chars = string.ascii_lowercase + string.ascii_uppercase + string.digits
filename = ''.join(filter(lambda x: x in allowed_chars, p.item.name)).lower()
if not filename:
filename = str(p.item.id)