CGI "download" prompt?

Bengt Richter bokr at oz.net
Mon Jul 28 11:06:25 EDT 2003


On Fri, 25 Jul 2003 16:45:19 +0200, =?ISO-8859-1?Q?Gerhard_H=E4ring?= <gh at ghaering.de> wrote:

>Daniel Orner wrote:
>>>Try setting the Content-Type: header to something other than text/html,
>>>such as:   application/octet-stream [...]
>
>Erhm. Let's suppose you want to send an RTF file and have the browser 
>pop up a save dialog with a certain filename preconfigured:
>
>Then send these headers:
>
>Content-Type: application/rtf
>Content-Disposition: attachment; filename=mydocument.rtf
>

I wonder if an ordinary HTML page with a link to a second HTML page
could be changed to have a javascript link in the first that would effectively
prefix Content-Disposition on the second page without changing the latter.

Wondering if you'd tried it, and found a way that avoids downloading into
an array before the save-as dialog comes up (I am just speculating that might
be part of one way it could be done).

Regards,
Bengt Richter




More information about the Python-list mailing list