• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Uploading a file from a form to my server with CFFTP

Explorer ,
Aug 02, 2018 Aug 02, 2018

Copy link to clipboard

Copied

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?

Views

412

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 02, 2018 Aug 02, 2018

Copy link to clipboard

Copied

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

V/r,

^ _ ^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 02, 2018 Aug 02, 2018

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 02, 2018 Aug 02, 2018

Copy link to clipboard

Copied

LATEST

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,

^ _ ^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation