coldfusion cffile upload how to describe the file to be uploaded -


i've never used cffile upload. in looking @ documentation see file uploaded described

name of form field used select file. not use number signs (#) specify field name.

i cannot decipher this. if file uploaded john.jpg, residing on user's disk, how indicate in cffile command?

i have other questions well, start basic one.

what documentation using? there should example there here: <cffile action="upload">

in example (which i've edited), shows not reference name of file user selected, anything, reference name of form field, filecontents, used upload file.

<!--- windows example ---> <!--- check see if form variable exists. ---> <cfif structkeyexists(form, "filecontents") >      <!--- if true, upload file. --->     <cffile action = "upload"         filefield = "filecontents"         destination = "c:\files\upload\"          accept = "text/html"         nameconflict = "makeunique">  <cfelse>      <!--- if false, show 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> 

once cffile process completes, collection of variables defined in structure named cffile (see documentation link). 1 of these variables cffile.clientfile, contains name of file uploaded user's computer.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -