I just verified this and started to post an email to the list, but found it was getting too long, so turned it into a blog entry.
You can read it here if you're interested: http://www.spike.org.uk/index.cfm?objectid=C5AEA1BB-22AB-07A9-699670C898E681 B1&startDate=02_2004 Spike >-----Original Message----- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of Christian Cantrell >Sent: Tuesday, February 17, 2004 8:07 AM >To: [EMAIL PROTECTED] >Subject: Re: [CFCDev] How should I define variable in a CFC? > >On Feb 16, 2004, at 12:19 PM, Stephen Milligan wrote: > >> 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] ---------------------------------------------------------- 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]
