code: func (handler *UnroutedHandler) sendProgressMessages(info FileInfo, reader io.Reader) (io.Reader, chan<- struct{}) {
  	progress := &progressWriter{
  		Offset: info.Offset,
  	}
  	stop := make(chan struct{}, 1)
  	reader = io.TeeReader(reader, progress)
  
  	go func() {
  		for {
  			select {
  			case <-stop:
  				info.Offset = atomic.LoadInt64(&progress.Offset)
  				handler.UploadProgress <- info
  				return
  			case <-time.After(1 * time.Second):
  				info.Offset = atomic.LoadInt64(&progress.Offset)
  				handler.UploadProgress <- info
  			}
  		}
  	}()
  
  	return reader, stop
  }
docs: // sendProgressMessage will send a notification over the UploadProgress channel
  // every second, indicating how much data has been transfered to the server.
  // It will stop sending these instances once the returned channel has been
  // closed. The returned reader should be used to read the request body.