Create a file called GetImage.cfm
It takes an ID as a parameter.

Code would look something like this (pseudocode):

Get Image file info based on passed ID
Set the filename the user sees using the CFHEADER
Use the Physical path retrieved from the database with CFCONTENT to 
send the
file to the user.


Now, any call you make to a file/image, you call the GetImage.cfm with 
the
appropriate ID.
The user will only ever see the path to GetImage.cfm - never the path 
to the
actual file.

HTH

Shawn Grover

-----Original Message-----
From: Bernd VanSkiver [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 19, 2001 11:41 AM
To: CF-Talk
Subject: cfm file/image downloader


I have searched through the CF-Talk archives, but could not find a 
solution
that actually works every time on this, want to be able to use
<cfcontent>/<cfheader> to force the user to download a file that i 
specify
in the ColdFusion template so that I don't have to give away the 
locations
of the file or use FTP to have them downloaded.  Anyone have some code 
for
this they would be willing to share about doing it?

Bernd VanSkiver
[EMAIL PROTECTED]
ColdFusion Developer

______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to