code: func (a *Archiver) doUpload(item *PendingItem) {
  	start := time.Now()
  	if err := a.c.Push(a.ctx, item.state, item.source); err != nil {
  		err = fmt.Errorf("push(%s) failed: %s", item.path, err)
  		// When an error occurs, early exit the process.
  		a.cancel()
  		item.SetErr(err)
  		item.done()
  		return
  	}
  	a.progress.Update(groupUpload, groupUploadDone, 1)
  	a.progress.Update(groupUpload, groupUploadDoneSize, item.digestItem.Size)
  	item.done()
  	size := units.Size(item.digestItem.Size)
  	u := &UploadStat{time.Since(start), size, item.DisplayName}
  	a.statsLock.Lock()
  	a.stats.Pushed = append(a.stats.Pushed, u)
  	a.statsLock.Unlock()
  	logging.Infof(a.ctx, "Uploaded %7s: %s", size, item.DisplayName)
  }
docs: // doUpload is called by stage 4.