Digital Media Suite API Forums

« Back to Digital Signs API Forum

RE: DMS add Asset from URL ... invalid file type

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
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?

Wally,
 
A few questions to get some context. Can you give more details about the text that you have pasted? Is this the HTML that you used to upload your asset? Have you been able to upload an asset using the HTML form in the document titled "Digital Signs API Programmer Guide v5.2.2, 5.2.3, 5.3.pdf"?
 
-Hashir

Hashir,

I have connected a document showing my failures.

Is this the HTML that you used to upload your asset?

No … this is using the suggested XML scripting.



Have you been able to upload an asset using the HTML form in the document titled "Digital Signs API Programmer Guide v5.2.2, 5.2.3, 5.3.pdf"?

Yes … using the standard method of adding assets through the DMM works.


Wally Koltys
[Description: dsce]
ITO Global Service Fulfillment
Unified Communications /Multimedia Planning
FMCC 1419, 104014
Mail Drop: 7870
One American Road
Dearborn, MI 48126-2701
Tel/Fax: 313-594-3929
Text Pager: http://vm4.dearborn.ford.com/cgi/textpage?pageto=wkoltys
e-mail: wkoltys@ford.com<mailto:wkoltys@ford.com>



From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
Sent: Friday, July 20, 2012 9:30 PM
To: cdicuser@developer.cisco.com
Subject: New Message from Hashir Baqai in Digital Media Suite API - Digital Signs API Forum: RE: DMS add Asset from URL ... invalid file type

Hashir Baqai has created a new message in the forum "Digital Signs API Forum":

--------------------------------------------------------------
Wally,

A few questions to get some context. Can you give more details about the text that you have pasted? Is this the HTML that you used to upload your asset? Have you been able to upload an asset using the HTML form in the document titled "Digital Signs API Programmer Guide v5.2.2, 5.2.3, 5.3.pdf"?

-Hashir
--
To respond to this post, please click the following link:

<http://developer.cisco.com/web/dms/forums/-/message_boards/view_message/6151057>

or simply reply to this email.
Attachments:

Can we please get some direction?

Appreciate it!