Content Studio Web Content Management System
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
[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: ByteA 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
Exception | Condition |
---|---|
CSPermissionDeniedException | The caller has no permission to perform the requested action |
CSInvalidSessionException | The session is invalid |
InvalidOperationException | The method cannot be called for non uploaded file types. |
CSDocumentNotFoundException | The document could not be found |
SqlException | An error occurred when executing the command against the Content Studio database |
Remarks
This method is new in Content Studio 5.2
Note |
---|
This method only works with uploaded files. |
See Also