Description
5.5.20
Describe the bug
I use SftpMessageHandler to send files to a remote SFTP server.
I want to transfer files using a temporary remote directory. Transfer is aborted if the temporary remote doesn't exist, otherwise it works fine.
To Reproduce
Transfer file test.txt to /remote setting /remote_temp as temporary directory. /remote_temp doesn't exist on target server
Expected behavior
If /remote_temp doesn't exist on remote server and autoCreateDirectory is true, the file is sent to /remote and /remote_temp is created to store the file before moving to final destination.
Sample
SftpMessageHandler handler = new SftpMessageHandler(sftpSessionFactory) ;
handler.setRemoteDirectoryExpressionString("headers['remoteDirectory']");
handler.setTemporaryRemoteDirectoryExpressionString("headers['remoteTempDirectory']");
handler.setAutoCreateDirectory(true);