Webforumz's RSS FeedRSS Webforumz RegistrationRegister Contact Webforumz StaffContact

Image Download Function

This is a discussion on "Image Download Function" within the Web Page Design section. This forum, and the thread "Image Download Function are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Aug 1st, 2008, 10:32
Junior Member
Join Date: Aug 2006
Location: Lancashire, UK
Age: 28
Posts: 36
Thanks: 3
Thanked 0 Times in 0 Posts
Image Download Function

Hi,
I wanted users to be able to download images from a site I'm doing. Basically a thumbnail image that when clicked would prompt the user to download a larger version of it.

Can anyone suggest where I may start?

Thanks,
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2  
Old Aug 1st, 2008, 11:09
Emzi's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Manchester
Age: 25
Posts: 174
Thanks: 0
Thanked 3 Times in 3 Posts
Re: Image Download Function

Hmm.... usually when linking to images it will display the image in the browser and then users would just right-click on the image and click save.

I'm not sure if you can prompt a download unless maybe you put the image in a zip folder?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Aug 1st, 2008, 14:56
Junior Member
Join Date: Aug 2006
Location: Lancashire, UK
Age: 28
Posts: 36
Thanks: 3
Thanked 0 Times in 0 Posts
Re: Image Download Function

I thought that myself and maybe put an explination on about the right click as not everyone would be aware this is possible, the people using the site won't be too 'web savvy'

I just thought there may be something I've missed to make it a little easier for users.

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Aug 1st, 2008, 19:09
Aso's Avatar
Aso Aso is online now
Moderator
Join Date: Oct 2007
Location: UK
Posts: 1,536
Blog Entries: 2
Thanks: 19
Thanked 81 Times in 76 Posts
Re: Image Download Function

I knew there was an answer here - dug this up!

Basically, if your server is Apache, you should be able to use the technique Rob provided (slightly altered - see below)

Code: Select all
<Files *.jpg>
  ForceType application/octet-stream
  Header set Content-Disposition attachment
</Files>
<Files *.jpeg>
  ForceType application/octet-stream
  Header set Content-Disposition attachment
</Files>
Paste that into a .htaccess file, and copy it to the folder that holds the images you want the user to be able to download
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Aug 1st, 2008, 19:16
Elite Veteran
Join Date: Aug 2005
Location: That Place
Posts: 2,044
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
Re: Image Download Function

That is pretty snazzy.
__________________

Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
add image src from javascript function ktsirig JavaScript Forum 1 Mar 14th, 2008 13:38
call php function in image url csun PHP Forum 16 Aug 19th, 2007 19:49
designing a site for batch image upload/download & viewing zephicus Starting Out 1 Mar 22nd, 2007 12:27
click image to download?? SJMAC Web Page Design 11 Jan 4th, 2007 15:41
passing an image to a function? Teaser ppgpilot PHP Forum 2 Mar 18th, 2006 01:28


All times are GMT. The time now is 19:24.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8