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
- Create an empty library item. See Create an Empty Library Item.
- Verify that you have access to the UpdateSession and File services.
Procedure
- Create an UpdateSessionModel instance to track the changes that you make to the library item.
- Create an update session by using the UpdateSession service.
- Create an AddSpec instance to describe the upload method and other properties of the file to be uploaded.
- Create the request for changing the item by using the File service.
- Upload the file that is on the local system.
- Complete and delete the update session to apply the changes to the library item.