Content Studio Web Content Management System
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Any authenticated caller can call this method and anonymous calls are supported.
[This is preliminary documentation and is subject to change.]
Checks whether a file can be uploaded to Content Studio.
Namespace: ContentStudio.Document
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax
public void CheckAllowedBinaryDocument( ConnectionId connectionId, SessionId sessionId, Nullable<DocumentId> documentId, Nullable<CategoryId> categoryId, string originalFilename, string virtualPath, long fileLength )
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: SystemNullableDocumentId
When supplied represents an existing document to save. If this parameter is null the check assumes that a new document should be created. - categoryId
- Type: SystemNullableCategoryId
If documentId is null this parameter is required and must represent a "File" category, otherwise it is ignored. - originalFilename
- Type: SystemString
The name of the file to upload - virtualPath
- Type: SystemString
An non empty string that represents a site-unique virtual path name. This parameter cannot be null. - fileLength
- Type: SystemInt64
The size (in bytes) of the file to upload.
Exceptions
Exception | Condition |
---|---|
CSInvalidSessionException | |
CSPermissionDeniedException | |
CSDocumentNotFoundException | |
CSInvalidParameterException | originalFilename is an empty string |
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. |
InvalidOperationException | Cannot call the SaveBinary or CreateBinary method for regular documents. |
SqlException | An error occurred when executing the command against the Content Studio database |
Content Studio permissions
Remarks
This method was introduced in Content Studio 5.6
This metod is typically used to test an upload operation before any real bytes have been uploaded. Most of the check operations that take place during one of the BinarySave or BinaryCreate methods are performed and if a check fails the appropriate exception are thrown.
See Also