I tested it with cfcatch and cfhttp, but creating a form upload to test if
it was also true for cffile seemed like a bit too much work.
I tested it, and oddly enough, I don't appear to be able to scope the CFFILE variable. Here's my component...
<cfcomponent>
<cffunction name="uploadFile" access="remote" output="yes">
<cfset var cffile = structNew()/>
<cffile action="upload" fileField="myfile" destination="/home/cantrell/tmp" nameConflict="makeUnique"/>
<cfset checkSize()/>
<br>done.
</cffunction>
<cffunction name="checkSize" output="yes">
<cfdump var="#cffile#"/>
</cffunction>
</cfcomponent>... and here's the page that calls it...
<html>
<form action="Upload.cfc" enctype="multipart/form-data"/>
<input type="file" name="myfile"/>
<input type="submit"/>
<input type="hidden" name="method" value="uploadFile"/>
</form>
</html>The CFFILE struct is correctly dumped whether I scope CFFILE or not. This surprises me because it is not consistent with CFHTTP, which I verified can be scoped (as Spike pointed out). So this appears to be where we stand:
Can be scoped: CFHTTP CFCATCH
Cannot be scoped: CFQUERY CFFILE
I'll pass this along to the CF team.
Christian
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
