Uploading to FTP

The CatDV Worker can be used to upload media to an FTP site. Probably the easiest way to do this is to use the ‘curl’ tool. Curl is built in to many Unix-like operating systems (including OS X) and can be downloaded for Windows. The homepage for curl is here.

Curl is a powerful tool for transferring data using a variety of protocols, including FTP and SFTP.

The manual for curl is available by typing

man curl

to a command prompt, and help topics are available with

curl -h

In this workflow we shall use the worker to publish media to an FTP site.

Set a Server Query to watch for FTP instructions

On the trigger tab of a new worker action, set a Server Query to look for a user field being updated. In this example we are looking for a user field called “Send to FTP” being changed to “Send to FTP”. This user field has been previously created as a Grouping field with “Send to FTP” as a value.


Tell the worker to publish the original media to an FTP site

Use execute command 2 on the Conversions tab for our FTP command line:

curl -T $b ftp://<site URL>/<Path on Server> --user user:password

$b is the media path of an existing asset in CatDV before processing

Here’s a real example:

curl -T $b ftp://support.squarebox.co.uk/pub/incoming/ --user simon:xyzzy123

curl can also handle SFTP, for these environments too, in this case the –key and –pub key options let you specify SFTP credentials.


Update the Status of the Clip

The asset can now be updated to show that the upload has happened. On the Publish tab, update the “Send to FTP” field to say “Sent”.