Here are the steps to recursively upload all subdirectories/subfolder and files from a folder to a server:
1. SFTP to the server.
sftp -oPort=xxx username@IP
2. If the name of your directory that you want to upload is 'ABC', create a directory 'ABC' on the server.
sftp> mkdir ABC
3. Then type 'put -r ABC' to transfer all subfolders and files of the directory.
sftp> put -r ABC