Solved

How do I create a link to a file using ColdFusion Mappings?

Posted on 2011-03-21
2
305 Views
Last Modified: 2013-12-24
I would like to post links to sensitive PDF documents on a password-protected cfm webpage. I do not want to actually post these sensitive PDF files on our website, so I created a CF mapping "/presentations"  which maps to D:\hiddendocs\

What would the link to this file - "D:\hiddendocs\123.pdf" look like?

This does not work:

<a href="/presentations/123.pdf">Download this File</a>
0
Comment
Question by:scooterboogle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 11

Accepted Solution

by:
Brijesh Chauhan earned 125 total points
ID: 35180163
CF Mappings are used for as below

ColdFusion mappings let the cfinclude and cfmodule tags access pages that are outside the Web root. If you specify a path that starts with the mapping's logical path in these tags, ColdFusion looks for the page using the mapping's directory path.

ColdFusion also uses mappings to find ColdFusion components (CFCs). The cfinvoke and cfobject tags and CreateObject function look for CFCs in the mapped directories.



The above will just point to http://www.yourwebsite.com/presentations/123.pdf, which will NOT work.

For href, you either need to give a absolute URL or a relative URL, you can define the mapping in  Application.cfm / Application.cf  file and then use it as a variable.
0
 

Author Closing Comment

by:scooterboogle
ID: 35180203
Thank you so much!
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question