Solved

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

Posted on 2011-03-21
2
307 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

617 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