code: func uploadFile(ctx context.Context, m *library.Manager, sessionID string, ovafile string, filename string) error {
  	var updateFileInfo library.UpdateFile
  
  	fmt.Printf("Uploading %s from %s\n", filename, ovafile)
  	size, md5String, _ := getOVAFileInfo(ovafile, filename)
  
  	// Get the URI for the file upload
  
  	updateFileInfo.Name = filename
  	updateFileInfo.Size = &size
  	updateFileInfo.SourceType = "PUSH"
  	updateFileInfo.Checksum = &library.Checksum{
  		Algorithm: "MD5",
  		Checksum:  md5String,
  	}
  
  	addFileInfo, err := m.AddLibraryItemFile(ctx, sessionID, updateFileInfo)
  	if err != nil {
  		return err
  	}
  
  	of, err := NewOVAFile(ovafile)
  	if err != nil {
  		return err
  	}
  	defer of.Close()
  
  	// Setup to point to the OVA file to be transferred
  	_, err = of.Find(filename)
  	if err != nil {
  		return err
  	}
  
  	req, err := http.NewRequest("PUT", addFileInfo.UploadEndpoint.URI, of)
  	if err != nil {
  		return err
  	}
  	req.Header.Set("vmware-api-session-id", sessionID)
  
  	return m.Do(ctx, req, nil)
  }
docs: // uploadFile will upload a single file from an OVA using the sessionID provided