code: func (l *AuditLog) UploadSessionRecording(r SessionRecording) error {
  	if err := r.CheckAndSetDefaults(); err != nil {
  		return trace.Wrap(err)
  	}
  	if l.UploadHandler == nil {
  		// unpack the tarball locally to sessions directory
  		err := utils.Extract(r.Recording, filepath.Join(l.DataDir, l.ServerID, SessionLogsDir, r.Namespace))
  		return trace.Wrap(err)
  	}
  	// use upload handler
  	start := time.Now()
  	url, err := l.UploadHandler.Upload(context.TODO(), r.SessionID, r.Recording)
  	if err != nil {
  		l.WithFields(log.Fields{"duration": time.Now().Sub(start), "session-id": r.SessionID}).Warningf("Session upload failed: %v", trace.DebugReport(err))
  		return trace.Wrap(err)
  	}
  	l.WithFields(log.Fields{"duration": time.Now().Sub(start), "session-id": r.SessionID}).Debugf("Session upload completed.")
  	return l.EmitAuditEvent(SessionUpload, EventFields{
  		SessionEventID: string(r.SessionID),
  		URL:            url,
  		EventIndex:     math.MaxInt32,
  	})
  }
docs: // UploadSessionRecording uploads session recording to the audit server
  // TODO(klizhentas) add protection against overwrites from different nodes