Commit 7ce211ff authored by koniu's avatar koniu
Browse files

fix #16 cannot download files with special chars

parent 0817886f
......@@ -304,7 +304,7 @@ def edit(resnum):
path = xt.idoctofile(doc.ipath, doc.mimetype)
pathismine = True
bottle.response.headers['Content-Disposition'] = \
'attachment; filename=%s' % os.path.basename(path)
'attachment; filename=%s' % os.path.basename(path).encode('utf-8')
print >> sys.stderr, "Sending %s with mimetype %s" % (path, doc.mimetype)
f = open(path, 'r')
if pathismine:
......
Supports Markdown
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