You can upload different types of files from a local system to a library item that you want to use in the vSphere Automationenvironment.
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 a file specification to describe the upload method and other properties of the file to be uploaded.
- Specify the location of the file to be uploaded by creating a TransferEndpoint instance.
- Add the file source endpoint to the file specification.
- Create a request for changing the item by using the configured file specification.
- Complete the update session to apply the changes to the library item.