I'm writing an AIR application that connects to my Subversion repo, gets the diff, and then downloads them to deploy to my website. I'm doing this via a NativeProcess which runs '/usr/bin/svn' and execute the necessary svn commands.
That's all working well up to uploading them to my website. I can't quite figure out how to upload the files to my website via an FTP terminal command using '/usr/bin/ftp'
Does anyone know how I can accomplish uploading a file to an FTP with AIR?
EDIT: SOLVED!
Instead of using FTP I switched to CURL using the following command:
curl --ftp-create-dirs -u uname:pass -T /Users/me/Documents/Subsync/tmp_109065090/sub/index.html ftp://ftp.mysite.net:21//web/content/sub/index.html
Couple things to note
- Be sure to add --ftp-create-dirs
- After the port use a double slash so that it bypasses the FTP's redirect (used when your ftp account is a sub-account or in a shared hosting environment).
- For ssl add --ftp-ssl to the curl command