1
0
Fork 0
mirror of https://github.com/koniu/recoll-webui.git synced 2025-10-03 09:49:25 +02:00

fix #16 cannot download files with special chars

This commit is contained in:
koniu 2013-09-15 18:54:22 +02:00
parent 0817886f15
commit 7ce211ff78

View file

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