Instead of opening a JPG image let the user DL it...???

liunx

Guest
I have a lil problem, i need to let the user Download <!--more--> JPG images instead of just viewing them in a browser window. <br />
A normal tag:<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"images/001.jpg"><img src="mini/mini001.jpg"></a><br />
does not work for me!!!<br />
I need the browser to give me the standard POP UP asking if the user wants to OPEN the file or SAVE IT TO DISK.<br />
if you got the answer help me out pleeeeeease!<!--content-->have you read this thread?<br />
<br />
<!-- m --><a class="postlink" href="http://forums.webdeveloper.com/showthread.php?s=&threadid=13220">http://forums.webdeveloper.com/showthre ... adid=13220</a><!-- m --><br />
<br />
it may contain your answer<!--content-->can't make it work, and anyway trying not to use php<!--content-->can't zip it?<!--content-->and additionally the image is in CMYK so it cannot open in Explorer or netscape so someone can just drag and drop, or use "save image as"<!--content-->your best bet would be to zip it....but if youre totally against that, the next easiest way would be to change the file extension...change it to something like .gremlin, so you can be sure the browser wont recognize it as a known filetype and try to open it...then the user Download <!--more-->s it and changes the extension back to .jpg....its primitive, but itd work...;)<!--content-->trust me i'd like to but that's just not possible in this case, needs to be with a jpg extention<!--content-->There are two ways to force a Download <!--more-->.<br />
<br />
1: set the file extention to something that a browser can't display... (the .zip method)<br />
<br />
2: use a server-side language (as Dave linked to above) to set the headers, and force the browser to Download <!--more--> the file.<!--content-->
 
Back
Top