How do I force download of an image instead of allowing someone to view it?

They have: 9 posts

Joined: Sep 2003

I want to have images available of cars so people can download them. When I link to the .jpg files, it just goes to the image and does not popup a download dialogue box. How do I force it to popup a download dialogue box?

~WebMember

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

I don't really think that is possible... why do you want to do that?

Busy's picture

He has: 6,151 posts

Joined: May 2001

put it in a zip file

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

If you are using PHP, try something like this: http://www.php.net/header#AEN41926 ( the description for the code is in the paragraph right above where this link takes you)

-Greg

He has: 1,380 posts

Joined: Feb 2002

I came up with a fantastic solution the other day...redirect them to a download page, that has the following embedded in it:

<iframe src="http://mysite.com/myfile.zip" width="0" height="0" visibility="0"></iframe>

That way you can have a good looking download page, with a download forced...ahahahha i love it

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.