Content Studio Web Content Management System
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Write permission on the document is required.
Some of the properties that involve publishing rules like Published or PublishDate require Approve permission on the document.
If the caller lacks this permission these fields are ignored.
Additionally, if workflow is applicable, workflow rules will apply as well.
The caller must have the WriteActiveContent global right set on at least of her groups in order to upload restricted file types. For a list of restricted file extensions see the the WriteActiveContent global right.
[This is preliminary documentation and is subject to change.]
Saves an existing binary document. The document cannot be a regular document.
This methods supports anonymous callers.
Namespace: ContentStudio.Document
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax
public void SaveBinary( ConnectionId connectionId, SessionId sessionId, DocumentId documentId, Object published, Object publishDate, Object archiveDate, string marking, string originalFileName, string contentSourceFile, string description, string keywords, string menuData, string menuTarget, string menuUrl, int bufferSize, bool resetFile, out string retFileName )
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
The id of the document to save. - published
- Type: SystemObject
Indicates if the document should be published or not. This parameter must be possible to cast or convert to a boolean but can be null to indicate to leave the value as is. - publishDate
- Type: SystemObject
A DateTime value that indicates the date when the document should be published. This parameter must be possible to cast or convert to the DateTime datatype but can be null to leave the value as is. - archiveDate
- Type: SystemObject
A DateTime value that indicates when the document should be archived and no longer published. To indicate no limit pass DateTime.MinValue or an empty string. This parameter must be possible to cast or convert to the but can be null to leave the value as is. - marking
- Type: SystemString
A short description of the document. This parameter cannot exceed MAX_MARKING_SIZE number of characters. This parameter can be null to leave the value as is. - originalFileName
- Type: SystemString
The original file name of the document. This parameter cannot exceed MAX_FILE_NAME_SIZE number of characters. This parameter can be null to leave the value as is. - contentSourceFile
- Type: SystemString
The a temporary file that contains the binary content to save. This parameter can be null or an empty string to avoid updating the content. - description
- Type: SystemString
The description for the document. This value is used as the ALT-tag when users link to the file in Content Studio. This parameter can be null to keep the current value unchanged. - keywords
- Type: SystemString
A list of keywords for the document. This value cannot exceed MAX_KEYWORD_SIZE characters in length. This parameter can be null to indicate to leave the value as is. - menuData
- Type: SystemString
User defined data for menu items. Only applicable if the document acts as a menu node. This value cannot exceed MAX_MENU_DATA_SIZE characters in length. This parameter can be null to leave the value as is. - menuTarget
- Type: SystemString
User defined target for menu items. Only applicable if the document acts as a menu node. This value cannot exceed MAX_MENU_TARGET_SIZE characters in length. This parameter can be null to leave the value as is. - menuUrl
- Type: SystemString
User defined url data for menu items. Only applicable if the document acts as a menu node. This value cannot exceed MAX_MENU_URL_SIZE characters in length. This parameter can be null to leave the value as is. - bufferSize
- Type: SystemInt32
The size used when writing chunked data. Pass zero to use the default buffer value - resetFile
- Type: SystemBoolean
Set to true to have Content Studio to write empty content into the document's file. If the parameter is set the no content is written to database and no image processing is performed. - retFileName
- Type: SystemString
Returns the relative filename of the document.
Exceptions
Exception | Condition |
---|---|
CSException | A business rule was violated in the underlying Content Studio database. |
ArgumentNullException | A parameter cannot be null. |
ArgumentOutOfRangeException | The file name passed in is reserved |
ArgumentException | A parameter data exceeded its maximum allowed length. |
SqlException | An error occurred when executing the command against the Content Studio database |
InvalidOperationException | Cannot call the SaveBinary method for regular documents |
Content Studio permissions
The caller must have the WriteActiveContent global right set on at least of her groups in order to upload restricted file types. For a list of restricted file extensions see the the WriteActiveContent global right.
See Also