Question : cffile upload in component

I have a component which I invoke and pass form fields to, one of these form fields is of type file.
I would like to do a file upload inside the component, using the file form field.
cffile requires an input of filefield, I cannot work out (or find in my Advanced CF MX books) how I would go about passing the form field (not its string value) to the cffile tag inside the component.
- of what type would the argument be?
- how do I pass in the field in the invoke statement?

e.g.
function:






  fileField = "#arguments.file#"
  destination = "#arguments.dest#"
  nameConflict = "#arguments.conflict#">
 
 



invoke statement:
component="#application.cfcpath#.functions"
method="uploadfile"
file="form.filename"
dest="#application.uploadpath#"
conflict="MakeUnique"
returnvariable="tfilename"
>

thanks
-h

Answer : cffile upload in component

Ok i figured it out...I forgot CFfile wants just the name of the form field it doesn't want it passed as a variable. I tested this out and it worked fine.






  fileField = "#filefieldname#"
  destination = "#arguments.dest#"
  nameConflict = "#arguments.conflict#">
 
 

Random Solutions  
 
programming4us programming4us