Cannot find file

I’m trying to download a file to a customer’s browser.

The file is TestR.rtf and only has a message saying this is TestR.rtf.

The code I am using to download it is in a program/template named Test1.cfm. Test1 and TestR are both in the root directory of a functioning web sire.

Test1.cfm has only (neglecting Head/Body, etc tags.):

This template tests downloads a file TestR.rtf.

<cfset fullpath = "c:\inetpub\webapps\bol\" />
<cfset dafile= "TestR.rtf" />
<cfheader name="Content-disposition" value="attachment;filename=#dafile#">
<cfcontent file="#fullpath##dafile#" type="application/rtf">

Result, Lucee (4.5) says TestR cannot be found? Have I done something wrong?

John Matlock

Hello John

Try to download a pdf instead of the rft.
If this works, you have to allow the rtf file format in the mime types of the IIS webserver.

Regards,
Christoph