SFTP: fix issue with uploading via a resource