"open or save " a jpg file
"open or save " a jpg file
am 02.08.2007 11:30:35 von giorgio
Hi,
I'd like to make the same thing as in flickr.com: a link that, if clicked,
doesn't open the jpg file, but asks if open or save it.
http://farm1.static.flickr.com/207/528622103_3a5c51e32b_o_d. jpg (asks if
open or save)
http://farm1.static.flickr.com/207/528622103_3a5c51e32b_o.jp g (link to jpg)
How can i make this?
Thanks
Re: "open or save " a jpg file
am 02.08.2007 12:40:59 von viza
Hi
Giorgio wrote:
> I'd like to make the same thing as in flickr.com: a link that, if
> clicked, doesn't open the jpg file, but asks if open or save it.
You need to get your server to send a
Content-Disposition: attachment
header. The way this is done depends on your server. If you are using
apache 2, you need to add eg:
header set Content-Disposition attachment
to the appropriate .htaccess file.
If you have not got permission to write to .htaccess, then you can still
botch it using php.
http://php.net/manual/en/function.header.php
http://php.net/manual/en/function.readfile.php
Re: "open or save " a jpg file
am 02.08.2007 13:54:20 von giorgio
Thanks for reply. I know ASP only, how could i do that with ASP?
Re: "open or save " a jpg file
am 02.08.2007 14:00:56 von Andy Dingley
On 2 Aug, 12:54, "Giorgio" wrote:
> Thanks for reply. I know ASP only, how could i do that with ASP?
Response.AddHeader('Content-Disposition: header stuff... ');
do it before you send _any_ of the content back
Re: "open or save " a jpg file
am 03.08.2007 01:47:54 von dorayme
In article <46b1a42c$0$10615$4fafbaef@reader2.news.tin.it>,
"Giorgio" wrote:
> Hi,
> I'd like to make the same thing as in flickr.com: a link that, if clicked,
> doesn't open the jpg file, but asks if open or save it.
>
> http://farm1.static.flickr.com/207/528622103_3a5c51e32b_o_d. jpg (asks if
> open or save)
This did not ask me anything. It just brought up my download OS
window (not browser), downloaded something and some image
software (set by me to open such files generally when I click on
..jpg in my file system) fired up and opened a pic of pups etc...
> http://farm1.static.flickr.com/207/528622103_3a5c51e32b_o.jp g (link to jpg)
>
> How can i make this?
> Thanks
--
dorayme