Question

When I try to run the following code, I'm getting the error message: "Element SERVERFILE is undefined in CFFILE.". I've done this a million times. Can anyone see what I'm missing?

    <cffile action="upload" fileField="fileField" destination="xxxx" 
        nameConflict="Overwrite" result="thisResult">
    <cfoutput>#cffile.ServerFile#</cfoutput>
Was it helpful?

Solution

You are using the result attribute. So instead of cffile.serverFile, use thisResult.serverFile.

Result Lets you specify a name for the variable in which cffile returns the result (or status) parameters. If you do not specify a value for this attribute, cffile uses the prefix cffile. For more information, see Usage.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top