473,440 Members | 2,004 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,440 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 1877
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.