I am having partial success …. The HTML code runs and attempts to write to the DMM. But it keeps erroring trying to write
[<fileType>____VALID_FILE_TYPE____</fileType> ] having the file type being VIDEO
(See reference below)
Add Asset from URL <table class="MsoNormalTable" style="border-collapse: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 0in 0in 0in;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 4.95pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes;">
<td style="padding-bottom: 0in; background-color: transparent; padding-left: 5.4pt; width: 193.4pt; padding-right: 5.4pt; height: 4.95pt; padding-top: 0in; border: #f0f0f0;" width="258" valign="top">
This API is used to create a new asset in the Digital Signs’ media library from a valid URL. Uploading an asset is done through a multi-part form. This multipart form only contains an xml with the input name “data”.
ACTION </td>
<td style="padding-bottom: 0in; background-color: transparent; padding-left: 5.4pt; width: 193.4pt; padding-right: 5.4pt; height: 4.95pt; padding-top: 0in; border: #f0f0f0;" width="258" valign="top">
POST </td>
</tr>
<tr style="height: 3.75pt; mso-yfti-irow: 1;">
<td style="padding-bottom: 0in; background-color: transparent; padding-left: 5.4pt; width: 193.4pt; padding-right: 5.4pt; height: 3.75pt; padding-top: 0in; border: #f0f0f0;" width="258" valign="top">
URL </td>
<td style="padding-bottom: 0in; background-color: transparent; padding-left: 5.4pt; width: 193.4pt; padding-right: 5.4pt; height: 3.75pt; padding-top: 0in; border: #f0f0f0;" width="258" valign="top">
/xTAS-core/services/content/assets/ </td>
</tr>
<tr style="height: 41.85pt; mso-yfti-irow: 2;">
<td style="padding-bottom: 0in; background-color: transparent; padding-left: 5.4pt; width: 193.4pt; padding-right: 5.4pt; height: 41.85pt; padding-top: 0in; border: #f0f0f0;" width="258" valign="top">
PREREQUISITES </td>
<td style="padding-bottom: 0in; background-color: transparent; padding-left: 5.4pt; width: 193.4pt; padding-right: 5.4pt; height: 41.85pt; padding-top: 0in; border: #f0f0f0;" width="258" valign="top">
title: thte title for the asset
filename: the url to the file
description: the description of the file
fileType: can be FLASH, HTML, IMAGES,UDP, or VIDEO
estimatedDuration: the default amount of time the asset should stay on screen
categoryIdList id: the ID of the category the asset should belong to
assetOwner: the username of the owner adding the asset
</td>
</tr>
<tr style="height: 178.7pt; mso-yfti-irow: 3; mso-yfti-lastrow: yes;">
<td style="padding-bottom: 0in; background-color: transparent; padding-left: 5.4pt; width: 193.4pt; padding-right: 5.4pt; height: 178.7pt; padding-top: 0in; border: #f0f0f0;" width="258" valign="top">
REQUEST </td>
<td style="padding-bottom: 0in; background-color: transparent; padding-left: 5.4pt; width: 193.4pt; padding-right: 5.4pt; height: 178.7pt; padding-top: 0in; border: #f0f0f0;" width="258" valign="top">
This sample HTML illustrates how to upload an asset:
<html>
<body>
<form action="
http://____YOUR_HOSTNAME____:8080/xTAS-core/services/content/assets/" enctype="multipart/form-data" method="POST">
data:
<textarea cols="40" rows="20" name="data"></textarea>
<br/>
<input type="submit" value="Upload"/>
</form>
</body>
</html>
“data” should be of the xml format:
<n1:asset xmlns:n1="
http://www.cisco.com/dms/xml/ns/dsm/contentManagement">
<title>____ASSET_TITLE____</title>
<fileName>____ASSET_FILE_NAME___</fileName>
<description>____ASSET_DESCRIPTION____</description>
<fileType>____VALID_FILE_TYPE____</fileType>
<estimatedDuration>
<Hours>0</Hours>
<Minutes>0</Minutes>
<Seconds>0</Seconds>
</estimatedDuration>
<categoryIdList>
<id>____CATEGORY_ID____</id>
</categoryIdList>
<assetOwner>____USER_NAME____</assetOwner>
<storageType>url</storageType>
<downloadurl>true</downloadurl>
</n1:asset>
</td>
</tr>
</tbody>
</table>
Any suggestions?