Community articleCreating a video thumbnail
Added by IBM contributorIBM on March 27, 2014
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Provide details on how to associate a preview image with a video.

Preview thumbnails are not generated for videos that are uploaded. Therefore, using the Atom Publishing Protocol, also known as AtomPub, you can associate a thumbnail preview image with a video. You may not use this to update the preview image associated with a photo.
 

Discoverability
You can derive the URL from the video document entry. Use the web address specified as the "href" attribute of the "<link rel="http://www.ibm.com/xmlns/prod/sn/cmis/multipart-form/object">" element.
 

Input
Method URI Description
POST /files/{authType}/cmis/repository/{repositoryId}/mobject/{objectId} URL to associate a preview image with a video
You can derive the URL from the video document entry. Use the web address specified as the "href" attribute of the "<link rel="http://www.ibm.com/xmlns/prod/sn/cmis/multipart-form/object">" element.
Content Type: application/atom+xml
Use the table below that represents the expected fields:
Name Type Optional Description
snx:rendition.0.file
string Yes This is the photo data.
snx:rendition.0.title
string Yes String. Use the value "video_preview.jpg"
snx:rendition.0.kind
string Yes String. Use the value "cmis:renditionTemplate"
snx:numRenditions
int Yes Integer. Use the value "1"
snx:deleteRenditions
string Yes String. Use the value "*"
cmis:changeToken
string Yes String. Time of change (Example: 2012-08-07T20:11:34.990Z )
cmis:objectId
string Yes String. Use the "id" of the file to attach the preview image to
cmis:baseTypeId
string Yes String. Use the value "cmis:document"
cmis:objectTypeId
string Yes String. Use the id of the cmis object type you have associated with a video if uploading a video or photo if uploading a photo. See more details on CMIS object types by going to Retrieving CMIS Object Type properties.
snx:tags
string Yes String. Provide a space separated list of tags
Name Type Optional Description
repositoryId
string No ID of the repository containing the media content
objectId
string Yes Object ID. By default the Media Gallery provides and uses a "Social Photo" object type with a CMIS id of "ada30772-31fe-44bf-b8b4-dd7e4f072cd6" and a "Social Video" object type with a CMIS id of "ada30772-31fe-44bf-b8b4-dd7e4f072ad6".
authType
enumerated No Authentication type
Authorized values:
  • basic
  • form
  • oauth
Name Type Optional Description
nonce
string Yes String. See Retrieving Nonce and User id for how to retrieve the nonce value.
opId
string Yes String. Use the value "upload_attachment,video_preview.jpg,{numericalDateRepresentation}". Replace {numericalDateRepresentation} with a number that represents the current timestamp.
Name Type Optional Description
X-Method-Override
string Yes String. Use value "PUT".
If-Match
string Yes String. Use the value "uid={userId}" where{userId} is the id of the user adding the preview image.
X-Update-Nonce
string Yes String. See Retrieving Nonce and User id for how to retrieve the nonce value.