Download with HTML

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Heselmans Yannick

    Download with HTML

    Hi,

    I don't know if it is possible but i would like to permit people to download
    a JPG picture just by clicking on it. I have tried with <a href> tags but
    this only download files like .exe, .zip, .pdf and it does'nt work with file
    like .jpg, .gif, ...

    I suppose I should add a parameter in my tag but I don't know wich one ?
    Something like

    <a href="adress_of _the_JPG_file" download="true" > <img
    src="adress_of_ the_JPG_file"></a>

    Thank you for helping me and sorry if I made some mistake but I am french.

    Yan


  • Jukka K. Korpela

    #2
    Re: Download with HTML

    brucie <brucie01@loser .brucies.com> wrote:
    [color=blue][color=green]
    >> I don't know if it is possible but i would like to permit people
    >> to download a JPG picture just by clicking on it.[/color]
    >
    > if they can see it they've already downloaded it.[/color]

    Indeed. And the FAQ _has_ something about this. Actually, quite a lot.
    [color=blue]
    > tell them to left
    > click on it and drag it to their location of choice (file sys,
    > graphics program etc etc). or right click and "save as..." or
    > whatever else the browser/OS your visitors use will let them do.[/color]

    Or don't. It would be redundant and even irritating to many users.
    While it might help a small minority (who understand the instructions -
    remember that communication always fails! - but did not know the method
    already), it would confuse some other minority, such as people using
    "different browsers".

    The idea of using

    <a href="adress_of _the_JPG_file"> <img
    src="adress_of_ the_JPG_file"></a>

    is interesting, and has some basis in the HTML 2.0 (sic) specification,
    which reminds us the fact that some browsers can deal with linked
    images but not embedded images. For example, it would be much easier to
    download the image using Lynx when there's a link. Naturally the <img>
    element shall have an alt="..." attribute, for this purpose and many
    others.

    But adding download="true" would be pointless, since no such attribute
    exists, or needs to exist.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

    Comment

    • brucie

      #3
      Re: Download with HTML

      In post <Xns93C9B331BBC F6jkorpelacstut fi@193.229.0.31 >
      Jukka K. Korpela said...
      [color=blue][color=green][color=darkred]
      >>> I don't know if it is possible but i would like to permit people
      >>> to download a JPG picture just by clicking on it.[/color][/color][/color]
      [color=blue][color=green]
      >> if they can see it they've already downloaded it.[/color][/color]
      [color=blue]
      > Indeed. And the FAQ _has_ something about this. Actually, quite a lot.[/color]
      [color=blue][color=green]
      >> tell them to left click on it and drag it to their location of choice (file
      >> sys, graphics program etc etc). or right click and "save as..." or whatever
      >> else the browser/OS your visitors use will let them do.[/color][/color]
      [color=blue]
      > Or don't. It would be redundant and even irritating to many users.
      > While it might help a small minority (who understand the instructions -
      > remember that communication always fails! - but did not know the method
      > already), it would confuse some other minority, such as people using
      > "different browsers".[/color]

      when i had my button site one of my biggest FAQs was how to save the
      images. admittedly the site was aimed at newbies but the numbers
      asking was amazing and disheartening. i had a page dedicated to
      instructions with lots of pictures for all the UAs that appeared in my
      stats. it still wasn't enough. one person that emailed wanted me to
      make an international phone call to walk them through what they had to
      do.

      --
      brucie a. blackford. 01/August/2003 07:17:02 am kilo.

      Comment

      Working...