1
0
Fork 0
mirror of https://github.com/koniu/recoll-webui.git synced 2025-10-03 17:59:50 +02:00

fix #15 download - filenames with spaces truncated

This commit is contained in:
koniu 2013-09-16 01:39:17 +02:00
parent 7ce211ff78
commit 75708e3a1d

View file

@ -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).encode('utf-8')
'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: