Commit 1f40006d authored by Jean-Francois Dockes's avatar Jean-Francois Dockes
Browse files

python3: fix download op for 2/3

parent 87a1b393
......@@ -337,10 +337,9 @@ def edit(resnum):
else:
filename = os.path.basename(path)
bottle.response.headers['Content-Disposition'] = \
'attachment; filename="%s"' % filename.encode('utf-8')
path = path.encode('utf-8')
'attachment; filename="%s"' % filename
bottle.response.headers['Content-Length'] = os.stat(path).st_size
f = open(path, 'r')
f = open(path, 'rb')
if pathismine:
os.unlink(path)
return f
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment