어떤 문서를 사용하고 있습니까? 여기에있는 예가 있어야합니다 : <cffile action="upload">
이 예에서는 (내가 편집 한) 사용자가 선택한 파일의 이름을 참조하지 않았 음을 나타냅니다. 양식 필드 이름이 이고, fileContents
이며 파일 업로드에 사용됩니다.
<!--- Windows Example --->
<!--- Check to see if the Form variable exists. --->
<cfif structKeyExists(Form, "FileContents") >
<!--- If TRUE, upload the file. --->
<cffile action = "upload"
fileField = "FileContents"
destination = "c:\files\upload\"
accept = "text/html"
nameConflict = "MakeUnique">
<cfelse>
<!--- If FALSE, show the Form. --->
<form method="post" action=<cfoutput>#cgi.script_name#</cfoutput>
name="uploadForm" enctype="multipart/form-data">
<input name="FileContents" type="file">
<input name="submit" type="submit" value="Upload File">
</form>
</cfif>
CFFILE
프로세스가 완료되면, 변수의 집합 (문서 링크 참조) CFFILE
이라는 구조로 정의된다. 이 변수 중 하나는 cffile.clientFile
이며 사용자 컴퓨터에서 업로드 한 파일 이름이 들어 있습니다. CFFILE 명령에 대한
당신이 예에 포함되지 바라 보았다 설명서를 했습니까? –
오, 그랬지만 아무것도 설명하지 못했습니다 : fileField = "FileContents"- "FileContents"는 무엇입니까? –