"open or save " a jpg file

Discussion in 'HTML' started by Giorgio, Aug 2, 2007.

  1. Giorgio

    Giorgio Guest

    Giorgio, Aug 2, 2007
    #1
    1. Advertising

  2. Giorgio

    viza Guest

    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:

    <Files *.jpg>

    header set Content-Disposition attachment

    </Files>

    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
     
    viza, Aug 2, 2007
    #2
    1. Advertising

  3. Giorgio

    Giorgio Guest

    Thanks for reply. I know ASP only, how could i do that with ASP?
     
    Giorgio, Aug 2, 2007
    #3
  4. Giorgio

    Andy Dingley Guest

    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
     
    Andy Dingley, Aug 2, 2007
    #4
  5. Giorgio

    dorayme Guest

    In article <46b1a42c$0$10615$>,
    "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.jpg (link to jpg)
    >
    > How can i make this?
    > Thanks


    --
    dorayme
     
    dorayme, Aug 3, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Roland
    Replies:
    0
    Views:
    1,074
    Roland
    May 12, 2004
  2. Matthias
    Replies:
    5
    Views:
    437
    Whitecrest
    Jun 1, 2004
  3. Yannick

    ASP changes Big JPG -> Small JPG

    Yannick, Feb 2, 2004, in forum: ASP General
    Replies:
    6
    Views:
    156
    Tim Williams
    Feb 3, 2004
  4. Vilmar Brazão de Oliveira
    Replies:
    14
    Views:
    350
    Aaron Bertrand [MVP]
    Mar 5, 2004
  5. Replies:
    3
    Views:
    264
    Andy Dingley
    Sep 27, 2006
Loading...

Share This Page