Hey,

I've got a file service cfc which is dealing with all my file uploading. What
im doing is creating an instance of the object and calling an init() which
defines the destination directory for the object (simple tings so far). I call
come other methods which set the valid types and also the file name field to
use when uploading blah blah, but then i got a bit confused with the next
bit... in a nutshell...

variables.fileService.uploadFile() // this calls the method
uploadFile() // this contains just cffile action=upload which all works fine

but then what i wanted to do was call another method inside the cfc
setFileName() which sets the file name and i can then retrieve that in the
caller script but it doesn't seem to work.

Am i thinking that i need to pass the object through to the uploadFile
function? i wanted it so that whatever method i called in the cfc actually
relates to the current object without having to pass it around.

Theres a bit of code here:

This is my listener:
variables.fileService =
createObject("component","indelibletv.model.file.f ileService").init(destination=
variables.uploadedImageRoot);

variables.fileService.setFileField(fileField);
variables.fileService.setValidTypes("gif,jpg,jpeg" );
variables.fileService.uploadFile();

This is uploadFile() in fileService:
<cffile action="upload" filefield="#getFileField()#"
destination="#getDestination()#" nameconflict="makeunique" mode="644" />
<script>
setFileName(cffile.serverFile);
</script>

Then this should retrieve the value thats just been set in the above method....
user.setIcon(variables.fileService.getFileName());

Would i have to pass variables.fileService to the upload method in order to
reference my object correctly?

Please help!!!