Skip to content

Latest commit

 

History

History
42 lines (26 loc) · 1.46 KB

File metadata and controls

42 lines (26 loc) · 1.46 KB

SFTP Sink

SFTP sink is a simple option to push files to an SFTP server from incoming messages.

It uses an sftp-outbound-adapter, therefore incoming messages can be either a java.io.File object, a String (content of the file) or an array of bytes (file content as well).

To use this sink, you need a username and a password to login.

Note
By default Spring Integration will use o.s.i.file.DefaultFileNameGenerator if none is specified. DefaultFileNameGenerator will determine the file name based on the value of the file_name header (if it exists) in the MessageHeaders, or if the payload of the Message is already a java.io.File, then it will use the original name of that file.

When configuring the sftp.factory.known-hosts-expression option, the root object of the evaluation is the application context, an example might be sftp.factory.known-hosts-expression = @systemProperties['user.home'] + '/.ssh/known_hosts'.

Input

Headers

  • file_name (See note above)

Payload

  • java.io.File

  • java.io.InputStream

  • byte[]

  • String

Output

N/A (writes to the SFTP server).

Options

The sftp sink has the following options: