My python cgi generates an ascii data file and sends it to the
client (to be saved on disk or opened in an app). I want my cgi
program to specify the name of the data file.
My best attempt is something like this:
print 'Content-type: text/x-whatever'
print 'Content-Disposition: inline; filename="'+remoteName+'"'
print
...statements printing file data
Works as advertised on Netscape Gold 3.0.
But MSIE 4.0 ignores my "remoteName" and makes up its own
file name for saving the data.
Any answers or pointers would be appreciated. Thanks.
--Jeff
Hope this helps
Thomas
Thanks for the idea. Yes, that would work, but I need to give the
downloaded file different names based on the user's input.
I wonder if this is some sort of "security feature" of MSIE?
Of course, if you do it that way you need to copy the file each time, might be
better to create a CGI which takes its path-info argument and does a lookup to
see what file to push to the client given that virtual filename. (Be careful not
to open up a security hole!)
Good luck,
Mike
Jeffrey Kunce <KUN...@mail.conservation.state.mo.us> --> Thu, 19 Feb 1998
19:41:23 GMT:
...
>>The only solution I have found (I had the same problem)
>>was to code the filename in the URL.
>>For example, selecting http://server/cgi/script/filename.ext
>>the browser will try to save to the file filename.ext.
...
>
>Thanks for the idea. Yes, that would work, but I need to give the
>downloaded file different names based on the user's input.
________________________________
M i k e C . F l e t c h e r
mcfl...@golden.net
http://www.golden.net/~mcfletch/
________________________________
Design, Consultation, Training