PDA

View Full Version : Leftclick-downloading an image file from a link


therend
05/29/2005, 18:49
Hello.
I'm wondering how best can be implementing the feature that I saw before on hotmail when you left-click on a link to download a picture attachment - it doesn't open in the browser but prompts you for saving instead.

I guess they just php-output the image with some unrecognised type but I'm wondering instead of sending the someone clumsy say application/zip (or something like that) is there some predefined mime type that the pros use.
Or is there a completely different way for that ?

Regards
Daniel

webous
05/30/2005, 07:07
header('Content-Type: image/gif');
header("Content-Disposition: attachment; filename=sample.gif");