we have a problem with the filename for files downloaded from our site.
The files downloaded are dynamically generated. Therefore we have a
product with a method "displayfile" which is called for each file to be
It is like that:
def displayFile(self, ... some arguments ... , REQUEST, RESPONSE = None):
content = # generate a file somehow
fileType, enc = guess_content_type(filename, content, REQUEST)
The Problem is, that the file to be downloaded always is called displayFile.
According the the content-type it is sometimes called displayFile.pdf,
displayFile.txt, displayFile.tif, etc.
But we need it to name according to the content some time hugo.pdf and
another time Thomas.txt, ..
How is it possible to change the filename? Do I perhaps have to set
another header-entry in the response-object?
Many thanks in advance,
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -