Pushing file name to browser

pxlpluker pxlpluker at cfl.rr.com
Mon Mar 8 23:24:19 CET 2004


after being pointed in the right direction by the other posts this is 
the answer that i have.

print 'Content-type: application/force-download; '
print 'Content-disposition: attachment; filename="fname.ext"'

will work on mozilla and the xp version of IE. i havent checked lower 
versions yet.

to test simply do this:
#!/usr/bin/env python
print 'Content-type: application/force-download; '
print 'Content-disposition: attachment; filename="fname.ext"'
print '\nThis is a test.'


--------------------------------------------------------------------------------------------------------
pxlpluker wrote:

> I what to dynamically create a page that has download links to file
> stored on disk.
>
> the part i don't know how to do (or if its possible) is to a different
> name appear in the browser DL window.
>
> i.e. I want the files stored with a random string but when being DL to
> have real name show in File Save dialog.
>
> in essence i want to push the file name to the browser
>
> Fred
>
>
>
>
>
>






More information about the Python-list mailing list