Unfortunately, the SFTP protocol itself lacks capabilities to achieve this. In SFTP, a file upload consists of series of small requests (open/write/write/write/.../close), which means that the final file size is only known when the file has already been uploaded and is being closed. Sorry!
Despite its name, SFTP is actually not a file transfer protocol (like FTP, for example), but rather a simple remote file system protocol (modeled to mostly match POSIX filesystem API).