DocumentReaderGetBinaryContent Method (ConnectionId, SessionId, DocumentId) Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Returns the content together with its size and type of a document. The content returned is Base64 binary data.

Namespace: ContentStudio.Document
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public Stream GetBinaryContent(
	ConnectionId connectionId,
	SessionId sessionId,
	DocumentId documentId
)

Parameters

connectionId
Type: ContentStudioConnectionId
A value that identifies the web site
sessionId
Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId).
documentId
Type: ContentStudio.DocumentDocumentId
An identifier of the document whose content should be read

Return Value

Type: Stream

A stream containing xml. The caller must close the stream after the call.

<root>
    <status>Integer value</status>
    <statustext>String value</statustext>
    <content contenttype="String value" 
             size="Integer value"
             contentbinary="String value"
    />
</root>

The xml has the following elements and attributes.

Xml specification
ElementAttributeDescription
root/status Indicates the outcome of the call. This value is always zero (0) which indicates success.
root/statustext The textual representation of the call. This value is always "Success".
root/content The element that contains the attributes containing the data.
root/contentcontenttypeA value that contains the content type (Mime type) of the returned data.
root/contentsizeA value that represents the size of the data.
root/contentcontentbinaryThe binary content. This value is a Base64 encoded data.
Exceptions

ExceptionCondition
CSExceptionA business rule was violated in the underlying Content Studio database
SqlExceptionAn error occurred when executing the command against the Content Studio database
Content Studio permissions

Remarks

This overloaded version of GetBinaryContent returns the currently approved content. READ permission on the document is required to read a draft and BROWSE for any approved content. This method supports anonymous users.
See Also

Reference