ColdFusion ServerFile is undefined in CFFile

2019-08-09 11:08发布

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>

1条回答
女痞
2楼-- · 2019-08-09 11:33

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.

查看更多
登录 后发表回答