[Zope] Setting default filename for download

Andreas Tille tillea@rki.de
Mon, 24 Mar 2003 15:51:35 +0100 (CET)


Hello,

I want to offer some PDF documents for download by a script.  I do this
by

    response = container.REQUEST.RESPONSE

    pdf  = <some code>
    name = <some reasonable name for this pdf>

    response.setHeader('Content-type', 'application/pdf' )
    response.setHeader('Content-Length', len(pdf))
    return pdf

I just want to realize that the downloader gets a sane default name for
the file to download which is stored in the variable "name" instead of
just the name of the script which returns the pdf.

How can I specify this?

Kind regards

        Andreas.

--
Mankind must put an end to war before war puts an end to mankind.
John F. Kennedy