CGI "download" prompt?

Daniel Orner cidolfas at rpgclassics.com
Thu Jul 24 18:14:50 EDT 2003


Hello,

I'm trying to figure out something... I'm writing a Python CGI system
that (in one aspect) acts as a file system interface by allowing the
user to upload/download files. The uploading is fine, but I'm having
problems with the downloading. I want to have a button that the user
can click and which would then open a "Save File" dialog in the
browser - effectively "serving up" a file for download. Unfortunately,
the files that I'm trying to give the user are HTML files. How do I
make it so the browser prompts to save the file rather than just
display it in the browser?

I specifically want the filename to remain the same, so renaming the
file won't work. Can anybody give me an idea as to how to do this?

Thanks very much!

--Daniel Orner




More information about the Python-list mailing list