Avatar

Level 3

Update on this for future people's benefit:

We were able to set up the curl command as per below, first by creating the curl string:

var upload = 'curl --verbose -k -T /sftp/<your folder>/incoming/' + instance.vars.filename + ' -u <name of sftp user>: --key <location of private key> --pubkey <location of public key> sftp://<destination SFTP folder>:22/uploads/sftp/in/

Note that

  • Both private & Public keys must be specified for the version of CURL that is installed on AC
  • destination sftp URL needs to be followed up / (to indicate folder, rather than create a file name)

Then run this in your js/file transfer activity

exec(upload);

}catch(e){

logInfo("ERROR = " +e.message);

}