Tom Muck

Alpha Dog Blues Band
Home page
All articles | DWTeam | Flash Remoting | Basic-Ultradev | Community MX
All Extensions | Extension News | Extension FAQs | Customer Login
Books authored or co-authored by Tom Muck
Extensions, books, and other products | Customer Login
Your current cart contents
Tom-Muck.com Blog | CMXTraneous Blog | Flash Remoting Blog
About the site

Force Download

Force Download

How often have you wanted to link to a particular type of file to allow your end user to download the file, only to come to the realization that the file opens up on the user's system instead of allowing a download. Many files do this, such as image files, PDF documents, Word documents, spreadsheets, etc. Even ASP, PHP, ColdFusion source files are a problem because they will execute instead of download to the user. This extension streams the file to the end user as a download instead of opening up on the user's system.

Let's take a look at the interface:

To use the extension, follow these steps:

  1. Open up a blank page in Dreamweaver (ASP only at this point.)
  2. Save it. This will be the file you link to.
  3. Open the extension by choosing Server Behaviors > Tom-Muck.com > Force Download
  4. Browse to the file you want the user to be able to download. The relative path to the file will be automatically calculated.
  5. The filename box will fill in automatically, or you can change the final filename to the user.
  6. Fill in or browse to an error page to redirect to in the event of an error.
  7. Click OK.
  8. Now, on any other page where you want a link to appear, link to this ASP file instead.

For example, let's say I have a file named instructions.pdf. When I link directly to the file, it opens up Acrobat Reader on the user's machine instead of being downloadable. I simply create a new file named instructions.asp on my ASP server, point the extension to the instructions.pdf file, apply the extension, and then link to instructions.asp instead of instructions.pdf. The file is now downloadable.

The extension should work in most browsers. Please use the contact form at the bottom of the page to contact me if you find problems with the extension.

The Force Download extension works in Dreamweaver MX and higher in ASP/VBScript and ASP/JScript. The extension is available for free download. For an UltraDev version go to www.basic-ultradev.com/extensions/

Download extension

Pay me securely with your Visa, MasterCard, Discover, or American Express card through PayPal!
Pay me securely with your Visa, MasterCard, Discover, or American Express card through PayPal!
About | Privacy Policy | Contact | License Agreement | ©2002-2014 Tom Muck | Dreamweaver Extensions