Skip to main content
Participating Frequently
July 28, 2008
Question

uploading a file

  • July 28, 2008
  • 2 replies
  • 308 views
All,
Here is my current code:
quote:


<cfif FORM.attachment1 neq "">
<!--- first actually upload the file --->
<cffile action="upload"
filefield="attachment1"
destination="c:\Inetpub\wwwroot\repository\uploads"
nameconflict="Makeunique">
</cfif>


I need to change the dynamic to code that is more easily uploaded to the server. This file is in /data and I want to upload the file to ../repository/uploads. Anyone tell me how to do this? "../repository/uploads/" does not work.
    This topic has been closed for replies.

    2 replies

    Participating Frequently
    July 28, 2008
    Thanks Azadi. that is it.
    Inspiring
    July 28, 2008
    destination="#expandpath('../repository/uploads/')#"

    [assumes repository dir is at the same level as the dir of the calling page]

    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/