I am just wondering… Is there a way to use sftp protocol with httpcomponent apache lib to upload files with multiparting?
I couldn’t find any tutorials so it would be greate you to share some code snippets in that direction…
Any useful comments are appreciated
Short answer – no, you cannot use HttpComponent to upload files using SFTP. HTTP and SFTP are poles apart. SFTP is even a true protocol on it’s own unlike FTP, it is merely a subsystem in a SSH2 server.
If you need to transfer files via SFTP, use a SSH library that supports the SFTP subsystem. If you want to use an Apache library, use Apache VFS as indicated in one of the answers.