Download image

Heya,

I want to put a link, like Download Image, for then user can download the image… but with this, the browser is open with that image…

Exist any function or something like that in php or javascript to make download and not open the browser ??

thks

Have you considered putting the image in a zip archive and then letting the browser handle that download as normal with an URL going to the zip?

In this case not, because the images to download are uploaded by other users… and format are jpg,gif,png , etc…

thks by the way

*Originally posted by Drunken *
**Heya,

I want to put a link, like Download Image, for then user can download the image… but with this, the browser is open with that image…

Exist any function or something like that in php or javascript to make download and not open the browser ??

thks **

not that i know of, unless you do it in flash

hmmm ok.

Thks

Maybe you’ll just have to fall back on an instruction to right-click and ‘Save picture as…’

Hey, if it’s good enough for Adobe Studio … ! :slight_smile:

Yah… it could be a good alternative… thks

*Originally posted by Cello *
**Maybe you’ll just have to fall back on an instruction to right-click and ‘Save picture as…’

Hey, if it’s good enough for Adobe Studio … ! :slight_smile: **

lol word, if adobe can do so can you!

:stuck_out_tongue:

Love it :stuck_out_tongue:

Good one, D!

actually, there is a way…

http://www.tek-tips.com/gpviewthread.cfm/qid/565555/pid/434/lev2/4/lev3/31

*Originally posted by njs12345 *
**actually, there is a way…

http://www.tek-tips.com/gpviewthread.cfm/qid/565555/pid/434/lev2/4/lev3/31 **

nice link

Here is all you need :wink:

(search button…)

http://www.kirupaforum.com/forums/showthread.php?threadid=32495

This is the best way to do it hands down. It works for any type of file but you would want to apply it only to a certain directory or all your images would open as save as rather the embeded in html.

AddType application/octet-stream .jpg

You can change the ending to anything you want. I use it for MP3, so people are forced to download the file, rather then stream it from something like winamp.

Add that you a .htaccess file inside a specific directory. Ex) www.yourdomain.com/download/images/. You must be using Apache.