The upload process creates a struct called File containing a whole
bunch of information about the file you just uploaded, and what teh
upload process did with it.    file size,   renamed or not,  location,
file type stuff like that.    you can pass the whole struct in a
single swoop to the CFC if you like by:

<cfinvoke ...>
  <cfinvokeargument name="filestruct" value="#file#">
</cfinvoke>

OR alternatively you can pass the bits of the struct you need in your
CFC like this:

  <cfinvokeargument name="filename" value="#file.servername#">
  <cfinvokeargument name="filesize" value="#file.filesize#">

You can have a look at the kind of information that's in teh file
struct by doing a CFDUMP as in:

<cfdump var="#file#" label="FILE" />  after the upload and see what it
contains.  You might be surprised at how much info is in there.

Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month


On 12/18/06, Adrian Wagner <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have a form from where the client can upload files to the site. I'm a
> bit confused about the passing on of the form field to the component
> here. A regular text field I'd pass on like this:
>
> <cfinvoke ...>
>  <cfinvokeargument name="imageName" value="form.imageN">
> </cfinvoke>
>
> And in the cfc:
>
> <cffunction ...>
>  <cfargument name="imageName" type="string">
> </cffunction>
>
> Now, there is no type 'file' for cfargument. What am I supposed to do
> in that case? Or is the variable I'm refering to here just a string
> anyhow, which refers to a file in the form scope?
>
> Would be glad about some enlightenment here.
>
> Adrian
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264286
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to