You can upload different types of files from a local system to a library item that you want to use in the vSphere Automation environment.

Prerequisites

Procedure

  1. Create an UpdateSessionModel instance to track the changes that you make to the library item.
  2. Create an update session by using the UpdateSession service.
  3. Create an AddSpec instance to describe the upload method and other properties of the file to be uploaded.
  4. Create the request for changing the item by using the File service.
  5. Upload the file that is on the local system.
  6. Complete and delete the update session to apply the changes to the library item.