Available for: Content Management Server
Task: Loads the blob specified in the parameters into the version.
Additional information:
- One of the parameters
blob,blob.plain,blob.base64, orblob.streammust be specified.
Syntax:
content withId contentId load {contentAttr value}
Function parameters:
- contentAttr refers to a parameter necessary for loading the blob. The
following names are allowed here:
-
blob,blob.plain,blob.base64, orblob.streamspecifies thatvaluecontains the properly encoded version to import or, respectively, thatvaluecontains a streaming ticket under which the version to import was uploaded. If several of these parameters are specified, it is undefined which one is evaluated. -
charset: the character set of the blob (for files that are no images). If not specified, the character set is taken from thecharsetuser preference. The default of this value isiso8859-1. The Content Manager converts the blob to UTF-8. The list of the available character sets can be determined using the Tcl commandencoding names. -
contentTypespecifies thatvaluerefers to the file name extension.
-
-
valuespecifies the value of the respective parameter.
Return value if successful: none
Necessary permissions: The user must have the permissionWrite permission
for the file to which the version belongs. She must be the editor of the file.
Example: Load a file as the main content of a version:
CM>content withId 25687 load blob [loadFile \ /Users/NPS/Upload/news.html] contentType html
Example for a corresponding obj command:
CM>obj withId 242235 editedContent load blob [loadFile \ /Users/NPS/Upload/news.html] contentType html