code: def upload_file(self, session, output, serverdir):
          
          name = output.metadata['filename']
          self.log.debug("uploading %r to %r as %r",
                         output.file.name, serverdir, name)
  
          kwargs = {}
          if self.blocksize is not None:
              kwargs['blocksize'] = self.blocksize
              self.log.debug("using blocksize %d", self.blocksize)
  
          upload_logger = KojiUploadLogger(self.log)
          session.uploadWrapper(output.file.name, serverdir, name=name,
                                callback=upload_logger.callback, **kwargs)
          path = os.path.join(serverdir, name)
          self.log.debug("uploaded %r", path)
          return path
docs: Upload a file to koji
  
          :return: str, pathname on server