I'm using Verity and ColdFusion 8. I'm displaying the
hyperlink of a pdf, but when it displays, it shows as a doc file.
It still opens the pdf, but I would like to show the correct
extension. Here's my code:
<!--- HREF to file is produced using either FILE protocol
or HTTP, depending on whether this is a web document.
so, we'll look at the file ext to determine if it's
a web doc or not --->
<cfset FileName=GetFileFromPath(Key)>
<cfset Ext=ListLast(FileName, ".")>
<!--- Display title if there is one, else name --->
<cfif Trim(Title) IS "">
<cfset display=GetFileFromPath(Key)>
<cfelse>
<cfset display=title>
</cfif>
<!--- Now display it --->
Key=#Key# <br>
display=#display# <br>
<a href="#url#">#display#</a> (#score#)
And here's what it returns. Out of about 300 pdfs listed, it
only displays 3 as a pdf, all others are showing as a doc file.
Key=C:\ColdFusion8\wwwroot\Decisions07\Corporation\0718719
& 0719549.pdf
display=Microsoft Word - 18719 & 19549.doc
Microsoft Word - 18719 & 19549.doc (1.0000)