Skip to main content
April 14, 2011
Question

Error with cfftp

  • April 14, 2011
  • 1 reply
  • 683 views

I am trying to work on a simple app that will allow users to easily send files to our FTP server.....

I have the form:

<cfform name="form" action="CF/ftpUp.cfm">

File to upload to FTP:  <cfinput type="file" name="testFile" title="Test">

<br>Email address:  <cfinput type="text" name="emailAddress"></br>

<!---<cfinput type="hidden" name="testFile" value="c:\tmp">--->

<br /><cfinput type="submit" name="Upload" value="Upload">

</cfform>

And the processing page:

<cfftp username="commuser" password="pass" action="putfile" localfile="#form.testFile#" remotefile="#form.testFile#" server="ftp2.idaho.net" transfermode="auto">

When when I select a file to upload, and try, I'm getting:

An error occurred during the FTP putfile operation.

Error: Basement Jaxx - Rooty - 01 - Romeo.mp3 (The system cannot find the file specified).

Why would this be??

    This topic has been closed for replies.

    1 reply

    Owainnorth
    Inspiring
    April 14, 2011

    And does that file exist on the server? You are aware that form you have isn't going to upload a file to the server for you?

    April 14, 2011

    It doesn't exist on the server, but on the client machine......

    Hmmmmm, if it has to go to the CF server first, and then up to the FTP site, that would be a pain.......is there a easier way??

    Owainnorth
    Inspiring
    April 14, 2011

    Nope, I'm afraid not. CFFTP runs on the server, the server does not have access to the client machine.

    However, it's not that hard. All you need to do is looking into CFFILE[action=upload] to upload the file from the client machine to the server, then you can FTP it across.

    Not as big a deal as you might hope, have a quick read up on uploading files to CF and let us know if you have any problems.