In an html form i have a user selecting a filename, which then i tried to send to his browser. Here is the code:
Code: Select all
filename = request.form.get('filename')
filepath = '/home/nikos/wsgi/static/files/'
return send_from_directory(filepath, filename)
If the filename selected is in english characters it gets send the user, but, if it contained a mix of english + greek chars it gives a `bad request` i tried to encode `filename.encode("utf-8") but then NO files are being served.
[Moderator: Moved from the "Website" section as that is for reporting problems with the
CentOS website, not yours]