My target remote file is being moved to the home directory using ftp outbound-channel-adapter.
Using an adapter like this:
I see from the logs that at .writing file is appropriately created in the specified remote directory. Then a rename occurs that moves the file to the user's home directory on the FTP server without the .writing extension.Code:<si-ftp:outbound-channel-adapter id="ftpOutbound" channel="outChannel" session-factory="ftpSessionFactory" charset="UTF-8" remote-directory="${ftpChannelRemoteWorkDestination}" />
I do like and need this rename feature in order to ensure files are complete before being touched, but I wonder why the remote directory is not used in the renamed file.
I have found a work around for this by adding the following to the adapter:
Is this a bug or intended behavior?Code:remote-filename-generator-expression="'${ftpChannelRemoteWorkDestination}/'+payload.getName()"
Also, what is the best way to remove the local file after it has been successfully sent?
I have not used channel interceptors before but would that work?
It would be nice to have a "delete-local-files" attribute on the outbound adapter similar to the "delete-remote-files" on the inbound one.
Just a thought, thanks for any help.


Reply With Quote