Changing Directory


right code allows me upload temp directory. change directory path. how can change this? below code working with.

------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------



<cfparam name="dir" default="#gettempdirectory()#">
<cfset thistemplate=getfilefrompath(gettemplatepath())>

<cfif listlast("#dir#","\") ".">
<cfset dir=getdirectoryfrompath(dir)>
<cfelseif listlast("#dir#","\") "..">
<cfset dir=getdirectoryfrompath(left("#getdirectoryfrompath(dir)#",len(getdirectoryfrompath(dir) )-1))>
</cfif>

right code allows me upload temp directory. change directory path.
to upload arbitrary directory, say, c:\myuploads\, put (full) path in tag cffile, value of destination attribute. example,

<cffile action = "upload"
filefield = "mydocs"
destination = "c:\uploads\"
accept = "text/plain, text/html, application/msword"
nameconflict = "makeunique">



More discussions in Getting Started


adobe

Comments

Popular posts from this blog

Rasperry Wifi LAN Controller - Raspberry Pi Forums

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

Unlock car with bluetooth and car key