code: def upload_file(self, localFileName, remoteFileName=None, connId='default'):
          
          thisConn = self.__getConnection(connId)
          outputMsg = ""
          remoteFileName_ = ""
          localFilePath = os.path.normpath(localFileName)
          if not os.path.isfile(localFilePath):
              raise FtpLibraryError("Valid file path should be provided.")
          else:
              if remoteFileName==None:
                  fileTuple = os.path.split(localFileName)
                  if len(fileTuple)==2:
                      remoteFileName_ = fileTuple[1]
                  else:
                      remoteFileName_ = 'defaultFileName'
              else:
                  remoteFileName_ = remoteFileName
              try:
                  outputMsg += thisConn.storbinary("STOR " + remoteFileName_, open(localFilePath, "rb"))
              except ftplib.all_errors as e:
                 raise FtpLibraryError(str(e))
          if self.printOutput:
              logger.info(outputMsg)
          return outputMsg
docs: Sends file from local drive to current directory on FTP server in binary mode.
          Returns server output.
          Parameters:
          - localFileName - file name or path to a file on a local drive.
          - remoteFileName (optional) - a name or path containing name under which file should be saved.
          - connId(optional) - connection identifier. By default equals 'default'
          If remoteFileName agument is not given, local name will be used.
          Examples:
          | upload file | x.txt | connId=ftp1 |
          | upload file | D:/rfftppy/y.txt |  |
          | upload file | u.txt | uu.txt |
          | upload file | D:/rfftppy/z.txt | zz.txt |
          | upload file | D:\\rfftppy\\v.txt |  |