473,387 Members | 1,582 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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
Jul 20 '05 #1
2 1876
brucie <br******@loser.brucies.com> wrote:
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.
if they can see it they've already downloaded it.


Indeed. And the FAQ _has_ something about this. Actually, quite a lot.
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.


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

Jul 20 '05 #2
In post <Xn*****************************@193.229.0.31>
Jukka K. Korpela said...
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.
if they can see it they've already downloaded it.
Indeed. And the FAQ _has_ something about this. Actually, quite a lot. 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.

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".


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.
http://loser.brucies.com/
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: James T Kirk | last post by:
How can I create a link to a zip/exe file, that will start a download and then redirect to another page. The files being downloaded will be different, but the page to be directed to will stay...
3
by: James Kirk | last post by:
The script below allows me to link to a file and as the user clicks to download, the 'File Download' windows appears as normal, and the user can download... The original page is then redirected...
6
by: chon | last post by:
I have an ASP page that is sent a file location as a parameter. It opens this file, loads the ADODB.Stream object and does a binary write to the page forcing the download dialog to appear. This...
0
by: Sarah Akers | last post by:
GgF ----gL5cJ72EqiGIQ0SK65Rz Content-Type: text/html; Content-Transfer-Encoding: quoted-printable <html> <head> <style type=3D"text/css">.eyebrow { FONT-WEIGHT: bold; FONT-SIZE: 10px; TE=
0
by: Anne Snow | last post by:
7qs ----bSCMEc0pLIbJxmV9 Content-Type: text/html; Content-Transfer-Encoding: quoted-printable <html><head><style type=3Dtext/css>.eyebrow { FONT-WEIGHT: bold; FONT-SIZE= : 10px;...
0
by: Lynda Kilgore | last post by:
jGu ----qtHwhORV90yyhqJMOc Content-Type: text/html; Content-Transfer-Encoding: quoted-printable <html><head><style type=3Dtext/css>.eyebrow { FONT-WEIGHT: bold; FONT-SIZE= : 10px;...
2
by: Jan Paul van de Berg | last post by:
I have a piece of software that people can download and a third party promoting that software. In order for them to be able to count the number of downloads, I have to put a tracking code on my...
16
by: matt | last post by:
I have used some free code for listing files for download, but I want to send an email to the administrator when the file has been downloaded. I have got some code in here that does it, but it will...
1
by: JayLembeck | last post by:
Over 50,000 Free Ringtone. Get the Latest Ringtone. Download now- Fast, Free and Easy. Get your FREE surprise RINGTONE now! http://seekoutfast.info/free-ringtone/ free ringtone free ringtone new...
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.