Upload a File from a
Local System to a Library Item
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.
- Create an empty library item. See Create an Empty Library Item.
- Verify that you have access to theUpdateSessionandFileservices.
- Create anUpdateSessionModelinstance to track the changes that you make to the library item.
- Create an update session by using theUpdateSessionservice.
- Create anAddSpecinstance to describe the upload method and other properties of the file to be uploaded.
- Create the request for changing the item by using theFileservice.
- Upload the file that is on the local system.
- Complete and delete the update session to apply the changes to the library item.