Skip to main content
Inspiring
June 16, 2008
Question

Downloading from ftp server to user machine

  • June 16, 2008
  • 1 reply
  • 308 views
I'm trying to figure out the best way for a user to open or download a file from a remote, secure ftp server. If I use cfftp, as I understand it, the file would need to first be transfered from the ftp server to the cf server and then could be downloaded to the user's machine using cffile. Is there a way to download it directly without the intermediate step?

Someone had suggested using cflocation to open the file on the ftp server directly, and while that works, it also seems to display the ftp password when it is getting the file...not too secure. Not all files should be accessible by all users so having an anonymous logon wouldn't necessarily produce the desired results either.

Any ideas on the best way to accomplish this?
    This topic has been closed for replies.

    1 reply

    Inspiring
    June 17, 2008


    DeliK wrote:
    > I'm trying to figure out the best way for a user to open or download a file
    > from a remote, secure ftp server. If I use cfftp, as I understand it, the file
    > would need to first be transfered from the ftp server to the cf server and then
    > could be downloaded to the user's machine using cffile. Is there a way to
    > download it directly without the intermediate step?

    without the intermediary step of first transferring the file from ftp
    server to cf/file server it is going to be hard since you do not/can not
    link directly to the ftp location...
    and no, you can't use cffile to download a file TO the user's computer -
    cffile is only for server-side file operations, not client-side.

    some ftp servers allow you remote user administration and creating users
    'on-the-fly'. if you ftp server supports that, you can create a
    temporary anonymous user account when a request for file is received,
    put the requested file into the account's shared folder and link the
    user directly to the file. you can then delete the account after some
    time, either manually or through a scheduled job or something like that.

    i have implemented a similar setup using FileZilla ftp server, but on
    the same machine as cf server and without secure access...

    by far the easier way will be to transfer the file from the ftp server
    to your user's designated folder on the cf/file server and link to it
    directly so that the web server (instead of cf sevrer) serves it up to
    the user for downloading. again, you can delete the files in user
    folders after some time with a scheduled task...

    hth



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