In your download.cfm:
<CFHEADER NAME="Content-Disposition" VALUE="attachment; filename=file.jpg">
<cfcontent type="application/unknown" file="c:\inetpub\wwwroot\images\file.jpg"
deletefile="No">
On your link to download it:
<a href="download.cfm/file.jpg">
--
Billy Cravens
HR Web Development, Sabre
[EMAIL PROTECTED]
Collin Judd wrote:
> Hey Everyone,
>
> I have a form that allows the user to upload any type of file to the server.
> I have another page that allows the user to browse the files that have been
> uploaded. I have a problem with the actual downloading of the file. As I
> am sure you are all aware, when you deal with image files, the browser likes
> to open those type of files.
>
> I am trying to figure out a way that when the user clicks on the download
> link that the file is forced to download rather than open in the browser. I
> have asked some close peers and they have suggested using cfcontent. Since
> the user can virtually upload any type of file, is there any way to specify
> an unknown mime type? Is there a better way of handling this situation?
>
> Any help with this would be great!
>
> Sincerely,
>
> Collin Judd
> PowerUp Networks
>
> -------------------------------------------------------------------------
> This email server is running an evaluation copy of the MailShield anti-
> spam software. Please contact your email administrator if you have any
> questions about this message. MailShield product info: www.mailshield.com
>
> -----------------------------------------------
> To post, send email to [EMAIL PROTECTED]
> To subscribe / unsubscribe: http://www.dfwcfug.org
-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com
-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org