Skip to main content
Participating Frequently
March 22, 2010
Answered

Can media files be moved to some ftp account using fms server side script?

  • March 22, 2010
  • 1 reply
  • 532 views

I need to move recorded media files at my fms account to some other ftp account. How can i achieve this through server side scripting.

    This topic has been closed for replies.
    Correct answer

    FMS doesn't have a built in FTP server, so I don't see a clear path to doing it with server side actionscript alone.

    That said, I can think of a few ways to handle moving the file:

    1. If the target server has an application server capable of making an FTP connection (PHP for example), you could use LoadVars to call out to a PHP program, and let PHP pull the file down via ftp.

    2. You might try using netservices and the File() class. You could read the video file into a variable, and post that to an AMF webservice (AMFPHP for example), and let the AMF service write it to file on the target server. If the file is too large to read into memory, you could read ranges of bytes, and send those bytes in separate requests to the AMF service (in that case, the AMF service would write the bytes to a file as they come in.

    1 reply

    Correct answer
    March 22, 2010

    FMS doesn't have a built in FTP server, so I don't see a clear path to doing it with server side actionscript alone.

    That said, I can think of a few ways to handle moving the file:

    1. If the target server has an application server capable of making an FTP connection (PHP for example), you could use LoadVars to call out to a PHP program, and let PHP pull the file down via ftp.

    2. You might try using netservices and the File() class. You could read the video file into a variable, and post that to an AMF webservice (AMFPHP for example), and let the AMF service write it to file on the target server. If the file is too large to read into memory, you could read ranges of bytes, and send those bytes in separate requests to the AMF service (in that case, the AMF service would write the bytes to a file as they come in.

    Participating Frequently
    March 22, 2010

    Thanks