I'm trying to upload a file via SFTP using Spring Integration (version 4.1.2). Does anyone know how to configure the sftp:outbound-channel-adapter so that the file gets uploaded automatically to user's home directory without indicating the full directory path in the remote-directory's attribute (ex: remote-directory="/home/sftp_user")?
0
votes
1 Answers
0
votes
The solution is that the remote-directory must be set as an empty string. Please note that the following won't work as it fails the XML model validation:
<sftp:outbound-channel-adapter
...
remote-directory=""
...
/>
I ended up reading the remote-directory from a configuration property which I set as an empty string.
remote-directory="/"
? – Artem Bilan.
, probably -/
might point to the root, unless chroot is in effect. – Gary Russell