in reply to Re: Re: FTP from web pages
in thread FTP from web pages

This is quite a nice way of doing it. However, if the script that prints this is called "download.pl" then your browser will prompt to save the gif as download.pl.

You can supply a different default filename by adding this to the headers:
print "Content-Disposition: attachment;filename=filename.ext";
where you can change filename.ext to whatever you want.

Replies are listed 'Best First'.
Re: Re: Re: Re: FTP from web pages
by merlyn (Sage) on Dec 20, 2000 at 18:48 UTC
      Nice one! Is that Apache (or similar) specific?

      I.e. Might some web servers report a 404 error because the script doesn't technically exist at that location?

      For those that haven't looked at this column of Merlyn's, he does a post to /path_to_cgi/scriptname.pl/desired_filename.ext

      For anyone else reading this, I recommend looking at Merlyn's site because there are a lot of useful ideas and snippets of code that one can use quite often.
Re: Re: Re: Re: FTP from web pages
by Daniellek (Sexton) on Dec 20, 2000 at 18:44 UTC
    I used that once upon a time, but my Netscape didn't support that, and i still got "download.pl" as a name of file :-(

    It's IE only supported AFAIK

    -- Daniellek