Quantcast
Channel: Adobe Community: Message List - ColdFusion
Viewing all articles
Browse latest Browse all 21760

CFContent open file with # in filename

$
0
0

I am trying to launch a file when the user clicks on a link. Sometimes the filename has a # sign in the name, like "My File #1.xlsx". When they click it, they get an error saying "The file specified in the contentTag does not exist" and then the shows .../My File not found.

 

Additionally, though I can't remember for sure at the moment, I think I've had trouble with a few other characters such as  ^, *, ?, ", <, >, |. And consecutive periods (.) like My...Filename.xlsx. However, I can live with that problem but not the # in the filename!

 

Surely there's something I can do to launch such a file.

 

Here's what I'm using:

 

this is the call: <td><a href="./fileopener.cfm?attached_file=true&file_location=#qryGetFileNa mes.ServerDirectory#\#qryGetFileNames.ServerFile#">#qryGetFileNames.Se rverFile#</a></td>

 

<cfset file_location = "#url.file_location#">

<cfheader name="content-disposition" value="attachment;filename=#file_location#">

<cfcontent deleteFile="no" file=#file_location# reset="yes">

 

Thank you.


Viewing all articles
Browse latest Browse all 21760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>