How can I use ColdFusion to serve files that exist outside of the web root?
Use the <cfcontent> tag. You can set the file attribute to point to a file on any local or mapped path on the system on which the web server runs. You also need to set the type attribute (A file or MIME content type, optionally including character encoding, in which to return the page).
<cfcontent file="C:\files\example.jpg" type="image/jpeg">
See also:
This question was written by Jeremy Petersen
It was last updated on December 3, 2007.