VMware Cloud Community
redsand007
Enthusiast
Enthusiast

vRO 8 - Upload A File From Local Storage To Content Library

I am trying to figure out how to upload a iso file from local storage to the vCenter Content Library.

In the vRO workflow it asks for the file (name: "iso" & type: MimeAttachment) and passes that through to script elements in the workflow.  I have everything from creating a content library item and getting a libraryID.  The problem seems to be where the uri is specified (see below)

var source_endpoint = new com_vmware_content_library_item_transfer__endpoint();
 
source_endpoint.uri = "file:///" +templateName+".iso";
 
filespec.source_endpoint = source_endpoint;
var filetype = "PULL";
filespec.source_type = filetype;
filespec.name = iso+".iso";
 
I don't know if this is the best way to go about doing this.  If there is a better way or the correct syntax to upload a local file to the content library any help would be much appreciated.
0 Kudos
0 Replies