Reply to topic
CFFILE problem -- getting a strange reference to a temp file
EricBourland


Joined: 05 Jan 2007
Posts: 61
Location: Chicago
Reply with quote
Hello. I'm having a problem with CFFILE uploads. Does anyone have any insight into a solution?

When I try to upload a file using the ColdFusion application that I built, CFFILE inserts into my database a strange reference to a temporary file, such as C:\CFusionMX7\runtime\servers\coldfusion\SERVER-INF\temp\wwwroot-tmp\neotmp47915.tmp.

I am using CFMX7.1 and an MS Access database, on HostMySite.com.

The input file is called story_edit.cfm and the relevant markup from that file is:
Code:

 <!--- interface to browse for a file on the local (user's) computer --->         

<h3>Upload a PDF version of the Story:</h3>

 <input type="file" name="downloadPDF" size="50"><br>
 <p>Action if File Exists:<br>
 <input type="radio" name="fileAction" value="overwrite" checked> Overwrite<br>
 <input type="radio" name="fileAction" value="makeUnique"> Make Unique<br>
 <input type="radio" name="fileAction" value="skip"> Skip</p>


The file that processes that input is called story_process.cfm and I copy that file here completely:
Code:


<!--- Edit or update? --->
<cfif IsDefined("FORM.StoryID")>
 <cfset method="update">
<cfelse>
 <cfset method="add">
</cfif>

<!--- Do it --->
<cfinvoke component="updateStories"
          method="#method#">
 <!--- StoryID only if update method --->
  <cfif IsDefined("FORM.StoryID")>
  <cfinvokeargument name="StoryID"
                    value="#FORM.StoryID#">
 </cfif>
 <cfinvokeargument name="StoryTitle"
                   value="#Trim(FORM.StoryTitle)#">
 <cfinvokeargument name="StoryText"
                   value="#Trim(FORM.StoryText)#">
 <cfinvokeargument name="StoryCommentary"
                   value="#Trim(FORM.StoryCommentary)#">
 <cfinvokeargument name="downloadPDF"
                   value="#Trim(FORM.downloadPDF)#">               
 <cfinvokeargument name="DateAdded"
                   value="#DateFormat(FORM.DateAdded)#">
            
                     
</cfinvoke>

<cffile action="upload"
destination="c:\websites\guardmk3f32be\stories\documents\"
nameConflict="#form.fileAction#"
filefield="downloadPDF">

<!--- When done go back to Story list --->
<cflocation url="/admin/manageStory.cfm">


The MS Access database has a field called downloadPDF that is supposed to contain output from story_process.cfm that points to the correct file in destination="c:\websites\guardmk3f32be\stories\documents\".

Instead, story_process.cfm populates database field downloadPDF with a strange reference to a temp file.

Has anyone else experienced this? I am grateful for ideas and solutions.

Best from Eric
Connie


Joined: 26 Mar 2005
Posts: 176
Location: The Internet
Reply with quote
That's just the temp directory, if you are getting access denied to that directory, just let Support know, the sandbox just probably needs to be updated.
EricBourland


Joined: 05 Jan 2007
Posts: 61
Location: Chicago
Reply with quote
Connie, thanks very much for the reply. I have resolved my problem.
Best from Eric
joejo318


Joined: 13 Jun 2008
Posts: 1
Reply with quote
Hi, I am having the same problem. Eric, could you shed some light on how you fix this problem? I tried granting access but it still wouldn't work. Thanks!
CFFILE problem -- getting a strange reference to a temp file
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic