I have to write multiple times to a file located at SFTP. I am using sftp:put to write contentstream to file. It writes 1st time, but from next time, it does not write anything in the file and errors out with error code4.
Steps I am following are :
login to sftp,
use ls and cd to go the directory where file is located,
write data to file using sftp:put and then
do not logout
2nd time when I write, I use same sessionKey