Link to a File
I have a page that lists all the files i a directory with a certain naming structure and links to them, but when I click the link for non .txt files I get an error. When trying to link to *some* PDFs the error I get is "File does not begin with PDF" or it just freezes. When trying to link to a .sql file (which is just a text file) it says "page cannot be found". I'm now looking at ways to force a download and found this: http://lab.artlung.com/coldfusion-force-download/ but when I use cfcontent type="text/plain" (for .sql) it prints out page source code. When I comment out the cfcontent and cfheader lines and just try to redirect using cflocation I get the error saying I'm trying to use a complex type. Is there any way to force the passed filename to act as a string? Am I missing something obvious?
Thanks!
