I actually had a major struggle with this but finally got it down with some
list help. Basically what you want to do is have a template with the
CFCONTENT tag on it, and then call it from a another template. Here's an
example:

You have a template called image.cfm

------

<CFCONTENT TYPE="image/jpeg"
FILE="D:\InetPub\nonpublicdirectoryname\image1.jpg" DELETEFILE="No">

------

Then you have a template that the viewer actually goes to, let's call it
dsp_image.cfm

------

<IMG SRC="image.cfm" WIDTH="100" HEIGHT="100" BORDER="0">

------

This will display the image from image.cfm inside the dsp_image.cfm page but
not allow anybody to get directly to the images. And of course you could add
something like this to make it more dynamic:

image.cfm:

<CFCONTENT TYPE="image/jpeg"
FILE="D:\InetPub\nonpublicdirectoryname\image#imagenum#.jpg"
DELETEFILE="No">

dsp_image.cfm:

<IMG SRC="image.cfm?imagenum=1" WIDTH="100" HEIGHT="100" BORDER="0">

Then you can do a loop or query to populate a whole page of images or
whatever you want to do.

-Will


----- Original Message -----
From: "Jeff Green" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 28, 2000 5:59 AM
Subject: CFCONTENT


>
> Hi,
>
> Im a bit confused on what cfcontent does?
>
> Im hoping it can deliver a file to be downloaded to the user, I would like
> the file to come from a DIR that web-users dont have access to and
CFserver
> does.  I hope to restrict access to download the file.
>
> Any Ideas?
>
> Any cfcontent examples would be cool )
>
>
> Thanks in advance,
> Jeff
>
>
> --------------------------------------------------------------------------
----
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to