WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-22-2008, 08:39 PM
rkstevens rkstevens is offline
WebProWorld New Member
 

Join Date: Dec 2005
Location: Philadelphia Suburbs
Posts: 23
rkstevens RepRank 0
Question File downloads

I want to force a file download when the user clicks on the link, and not have it open in the default program. I have an .mp3 download that I WANT as a download, and not played when clicked.
I want to try to idiot-proof the link for those that would not bother to read instructions such as "right-click and select 'saveAs'"

Can this be done?
Ron
Reply With Quote
  #2 (permalink)  
Old 03-23-2008, 12:51 PM
incrediblehelp's Avatar
incrediblehelp incrediblehelp is offline
Moderator
WebProWorld Moderator
 

Join Date: Jan 2004
Location: Live in Cincy Now
Posts: 7,356
incrediblehelp RepRank 4incrediblehelp RepRank 4incrediblehelp RepRank 4incrediblehelp RepRank 4
Default Re: File downloads

Yeah, but you should not do this as it forcing any sort of download can be construed as bad thing. If you want music to play when the user gets to a page, their are many other ways to do this.
Reply With Quote
  #3 (permalink)  
Old 03-23-2008, 04:02 PM
rkstevens rkstevens is offline
WebProWorld New Member
 

Join Date: Dec 2005
Location: Philadelphia Suburbs
Posts: 23
rkstevens RepRank 0
Default Re: File downloads

But here is my concern: The .mp3 is tied in with a special promotion that is going to be running on the site. I have a licence from the publisher to be able to give away a certain number of downloads. Therefore, I want the visitors when they get to the page to download the song. I do not want it to be played in the browser. I feel that if people are able to listen to the file in their browser, then they just may revisit the page several times to listen to the song, and use up my allotted number of free downloads unnecessairly. While I know someone could get multiple downloads, I think the liklihood of this happening is much less than if they were able to play the song in their browser. Also, I might be logging IP addresses to prevent multiple downloads (depending on the customer's wishes) and if someone just listens to the song when they wanted to download it, they would be upset when they are told they cannot access the file again. The target demographic is an older age, so I must assume that they would not understand about retrieving a file from their browser cache.
I just feel that forcing the e"Do you want to open this file, or save it" box so the user can control this choice, and then choose save to open the "Save as" dialogue box, over allowing the media player to play the file in the browser, is the best thing that I can do given the situation.
Reply With Quote
  #4 (permalink)  
Old 03-23-2008, 04:55 PM
incrediblehelp's Avatar
incrediblehelp incrediblehelp is offline
Moderator
WebProWorld Moderator
 

Join Date: Jan 2004
Location: Live in Cincy Now
Posts: 7,356
incrediblehelp RepRank 4incrediblehelp RepRank 4incrediblehelp RepRank 4incrediblehelp RepRank 4
Default Re: File downloads

Why not do the proper thing and create a page that convinces the users to download the song instead of trying to trick them into downloading it automatically?
Reply With Quote
  #5 (permalink)  
Old 03-26-2008, 07:58 AM
rkstevens rkstevens is offline
WebProWorld New Member
 

Join Date: Dec 2005
Location: Philadelphia Suburbs
Posts: 23
rkstevens RepRank 0
Default Re: File downloads

WWW FAQs: How do I force the browser to download a file to disk instead of playing or displaying it?
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum


Thread Tools
Display Modes

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

vB 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
Reach Metrics on File Downloads? musicmmh23 Content Discussion Forum 3 06-28-2007 05:56 AM
How to converter video file into a flash file ,with effect? andy_lucky Flash Discussion Forum 0 04-04-2006 11:37 AM
Windows 2000 Slow with File Open and File Save Dialog Boxes steve0 IT Discussion Forum 2 09-15-2005 05:27 PM
Dreamweaver: Error accessing file...bad file path mimsymc Graphics & Design Discussion Forum 6 07-10-2005 08:43 PM
Blocking graphic file right-click downloads Sereniti Web Programming Discussion Forum 50 11-08-2003 03:23 PM


Search Engine Friendly URLs by vBSEO 3.0.0