Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / August 2005



Tip: Looking for answers? Try searching our database.

CFContent deletefile="yes" does not delete file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
briankitt - 31 Aug 2005 21:53 GMT
I have a query that I want to push to the user as a .CSV file.  I have the
following code.  I only create a temporary file, then I want it deleted after
the user downloads the file.  This pushes the file to the user, but never
deletes the temporary file.  I expected the 'deletefile="yes"' to delete the
tempoary file.  What am I doing wrong?

<cfset externalName = "Report.csv">
<cfset internalName = GetDirectoryFromPath(GetBaseTemplatePath()) & "Reports\"
& CreateUUID() & ".csv">
<cffile file="#internalname#" action="write" .....>
....
<cfheader name="Content-Disposition" value="attachment;
filename=#externalname#">
<cfcontent type="application/msexcel" file="#internalname#" deletefile="yes">
rouwd - 31 Aug 2005 23:00 GMT
This sounds like a permission issue. Make sure the user that the CF services run can delete files in the directory with the .CSV file.

Rouwd
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.