Skip to main content
Inspiring
Aug 2, 2018 5:32 PM UTC
Question

Uploading a file from a form to my server with CFFTP

Hi,

I'd edit my cffile discussion but it won't let me for some reason.

I had been using cffile locally but I realized I probably need to use CFFTP.  My question is, when I create a file filed in a form, how do I connect that to a CFFTP putfile action?  Like, what do I put after localfile = and remotefile = if the file is coming from a form?  And can i use nameConflict = "MakeUnique" within the CFFTP putfile action?

Thanks,

MIke

edit: so now I'm learning that cfftp only uploads files from the coldfusion server to the directory.  What if I have a web host and don't control the coldfusion server?  Is there still a way for a user to upload an image onto my site?  What information would I need from my web host to do this?

    This topic is closed to new replies. Start a new post to keep the conversation going.

    3 replies

    WolfShade
    Legend
    Aug 2, 2018 6:18 PM UTC

    CFFTP is for transferring files between servers.  CFFILE is used for uploading from a form.

    V/r,

    ^ _ ^

    Translate
    wycksAuthor
    Inspiring
    Aug 2, 2018 6:37 PM UTC

    what information do i need from my web host to upload from a form?  like what type of afddress goes int he destination field to a remote server?  like an ip address?

    Translate
    WolfShade
    Legend
    Aug 2, 2018 6:48 PM UTC

    If you are using a form to upload a file, use CFFILE on the action page for that form.

    In your CFFILE thread, the answers are there.  Your code was correct with the exception of the destination; it has to be a full physical path, not a relative path.

    HTH,

    ^ _ ^

    Translate