1 package OpenILS::Application::Trigger::Reactor::SendFile;
2 use OpenILS::Application::Trigger::Reactor;
3 use base 'OpenILS::Application::Trigger::Reactor';
5 # use OpenSRF::Utils::SettingsClient;
6 use OpenILS::Utils::RemoteAccount;
14 The SendFile Reactor Module attempts to transfer a file to a remote server via
17 No default template is assumed, and all information is expected to be gathered
18 by the Event Definition through event parameters:
19 ~ remote_host (required)
26 ~ type (FTP, SFTP or SCP -- default FTP)
30 The processed template is passed as "content" with the other params to
31 OpenILS::Utils::RemoteAccount. See perldoc OpenILS::Utils::RemoteAccount for more.
33 TODO: allow config.remote_account.id to specify options.
40 my $params = $env->{params};
42 $params->{content} = $self->run_TT($env) or return;
43 my $connection = OpenILS::Utils::RemoteAccount->new(%$params) or return;
44 return $connection->put;