DocumentReaderGetBinaryContentAsByteArray Method Content Studio 5.7 SDK
Content Studio Web Content Management System

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

Gets the binary content as byte array.

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

public byte[] GetBinaryContentAsByteArray(
	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: Byte

A byte array of binary data.

The returned value can be null (Nothing in Visual Basic) if there is no content or if the document is in the recycling bin.

Exceptions

ExceptionCondition
CSPermissionDeniedExceptionThe caller has no permission to perform the requested action
CSInvalidSessionExceptionThe session is invalid
InvalidOperationExceptionThe method cannot be called for non uploaded file types.
CSDocumentNotFoundExceptionThe document could not be found
SqlExceptionAn error occurred when executing the command against the Content Studio database
Remarks

This method is new in Content Studio 5.2

Note Note
This method only works with uploaded files.
See Also

Reference