Serve your PDFs through a cfm with <cfcontent>

Something like this:

<cfheader name="Content-Disposition" 
value="ATTACHMENT;FILENAME=Filename.pdf">
<cfcontent type="application/pdf" file="c:\path\to.pdf">

(Note the file path can be anywhere on the hard drive or network that CF 
has access to.)

Then just put that cfm inside your protected application. When someone 
requests that file, they should be presented with a login form or something.

-nathan strutz
http://www.dopefly.com/



Wurst, Keith D. wrote:
> Hi everyone. I have a cf security question. I have a website and on that
> site are some pdfs. The site is password protected. On the site I have a
> pdf directory where I keep all my pdf's. I am concerned that if I
> emailed someone a link http://www.mysite.com/pdf/pdfname.pdf that they
> would be able to open the pdf without having to log into the site first.
> Is there a way to force users to have to login before they can open a
> ..pdf - and still email them a link in the format I have written above?
> Thanks so much for the help.
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199607
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to