truncate filename given in content-disposition (#3245)

This commit is contained in:
Frédéric Péters 2013-07-16 10:17:13 +02:00 committed by Frédéric Péters
parent ed2537168a
commit c9c0e90c33
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ class AvisOdt:
# Tell the browser that the resulting page contains PDF
response.setHeader('Content-type', 'application/%s' % fileType)
response.setHeader('Content-disposition',
'inline;filename="%s.%s"' % (self.id, fileType))
'inline;filename="%s.%s"' % (self.id[:200], fileType))
# Returns the doc and removes the temp file
f = open(tempFileName, 'rb')
doc = f.read()