Skip to main content
Inspiring
August 2, 2018
Question

Uploading a file from a form to my server with CFFTP

  • August 2, 2018
  • 1 reply
  • 528 views

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 has been closed for replies.

    1 reply

    WolfShade
    Legend
    August 2, 2018

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

    V/r,

    ^ _ ^

    wycksAuthor
    Inspiring
    August 2, 2018

    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?

    WolfShade
    Legend
    August 2, 2018

    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,

    ^ _ ^