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

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

Tests if a binary file exists in a category. This method can be called by upload code before any content is uploaded into Content Studio temp direcory. The caller can test if there is a file with this name uploaded in the category and ask the user if it should be overwritten or be given another name. This methods supports anonymous callers.

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

public bool ExistsUploadedFile(
	ConnectionId connectionId,
	SessionId sessionId,
	CategoryId categoryId,
	string fileName,
	out int documentId


Type: ContentStudioConnectionId
A value that identifies the web site
Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId).
Type: ContentStudio.DocumentCategoryId
The category to upload the file into.
Type: SystemString
The name of the file to test. This name cannot include any path just the file name including its extension.
Type: SystemInt32
If the file name exists in the category this parameter returns the id of an existing document with this name.

Return Value

Type: Boolean
True if there is a file with this name already, false otherwise.

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

Read permission on the category is required.
See Also