首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >标记CFFILE的属性验证错误

标记CFFILE的属性验证错误
EN

Stack Overflow用户
提问于 2011-10-07 17:37:42
回答 2查看 6.4K关注 0票数 0

目前,我

代码语言:javascript
复制
<cfset filedirectoryYear = "E:\FilesSubmitted\"&#form.current_year#&"\"&#form.division#&"\">
<cfif FORM.attachment_1 neq "">
    <cffile action="upload"
        accept="text/plain,application/msword,application/pdf,application/rtf"          
        filefield="attachment_1"
        destination="E:\temp\uploads"
        nameconflict="Makeunique"
    >
    <!--- rename the file and move it to permanent destination --->        
    <cfset submittedfileName =               
        #form.departmentname#&"_"&#form.departmentnumber#&"_"&#form.section_number_1#&"."&#cffile.ClientFileExt#>
    <cfset presentfileName = #cffile.serverFileName#&"."&#cffile.ClientFileExt#>
    <cffile
        action="rename"
        source="E:\temp\uploads\#presentfileName#"
        destination=#filedirectoryYear##submittedfileName#
    >
    <!---   now create a temporary variable for the attachment so that it can be emailed later on --->
    <cfset attachment_local_file_1 =  
        #filedirectoryYear#&#submittedfileName#&#cffile.ClientFileExt#>
</cfif>
<cfset attachment_local_file_1 = #filedirectoryYear#&#submittedfileName#>

当我提交时,我会收到错误消息。

标记CFFILE的

属性验证错误。

属性源的值(当前为E:\temp\uploads\File.pdf )无效,因此引用了这一行。片段中的destination="#filedirectoryYear##submittedfileName#"

代码语言:javascript
复制
<cffile
    action="rename"
    source="E:\temp\uploads\#presentfileName#"
    destination=#filedirectoryYear##submittedfileName#
>

存在filedirectoryYear路径。有什么问题吗?我正在使用ColdFusion 8在带有IIS的Windows计算机上

EN

回答 2

Stack Overflow用户

发布于 2011-10-07 17:46:24

您觉得CF指向的是一个不正确的目的地,但是精明的观察者会注意到错误消息指出了“源”是问题所在。

您的代码声称源代码是E:\temp\uploads\(some variable)

错误声明源是c:\Course Syllabi\uploads\Web Based System Two Page Handout.pdf

我会返回并确保您正在调试正确的代码行。

票数 0
EN

Stack Overflow用户

发布于 2013-06-03 10:38:17

对于这种类型的错误,请检查文件的路径,此错误发生在目标路径或源路径不正确的情况下。

代码语言:javascript
复制
check desired folder exist in same path
check Root Directory mean site URL is it correct 
print the path and verify it with your directory surely there will be  any conflict remove it that's why this error arising
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7690846

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档