def _putRemoteFile(self, localStream, remotePath):
        """
        Do an upload request.

        @param localStream: Local stream from where data is read.
        @type localStream: File like object.

        @param remotePath: Remote path for the request relative to current working directory.
        @type remotePath: L{str}

        @return: A deferred which fires when transfer is done.
        """
        remote = os.path.join(self.currentDirectory, remotePath)
        flags = (
            filetransfer.FXF_WRITE |
            filetransfer.FXF_CREAT |
            filetransfer.FXF_TRUNC
            )
        d = self.client.openFile(remote, flags, {})
        d.addCallback(self._cbPutOpenFile, localStream)
        d.addErrback(self._ebCloseLf, localStream)
        return d

        Do an upload request.

        @param localStream: Local stream from where data is read.
        @type localStream: File like object.

        @param remotePath: Remote path for the request relative to current working directory.
        @type remotePath: L{str}

        @return: A deferred which fires when transfer is done.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/scripts/cftp.py