Defines connector's configuration. More...
Public Member Functions | |
ConnectorConfiguration () | |
Constructs a new instance of ConnectorConfiguration. More... | |
ConnectorConfiguration | AddBackend (string name, IFileSystem fileSystem, string baseUrl=null, bool isProxy=false) |
Adds a backend to the connector. More... | |
ConnectorConfiguration | AddProxyBackend (string name, IFileSystem fileSystem) |
Adds a backend to the connector. More... | |
ConnectorConfiguration | RemoveBackend (string backendName) |
Removes a backend from the connector. More... | |
IBackend | GetBackend (string backendName) |
Gets a backend with given name. More... | |
ConnectorConfiguration | AddResourceType (string resourceTypeName, Action< ResourceTypeBuilder > resourceBuilderAction) |
Adds ResourceType to the connector. More... | |
ConnectorConfiguration | RemoveResourceType (string resourceTypeName) |
Removes ResourceType from the connector. More... | |
ConnectorConfiguration | AddAclRule (AclRule aclRule) |
Adds AclRule to the connector. More... | |
ConnectorConfiguration | RemoveAclRule (AclRule aclRule) |
Removes AclRule from the connector. More... | |
ConnectorConfiguration | SetThumbnailSizes (params SizeAndQuality[] allowedSizes) |
Sets allowed thumbnail sizes for the connector. More... | |
ConnectorConfiguration | SetThumbnailBackend (string backendName, string thumbnailsPath) |
Defines which backend should be used for storing thumbnails. More... | |
ConnectorConfiguration | SetImageResizeThreshold (int pixels, int percent) |
Defines the maximum difference in width and height between cached and requested resized image. More... | |
ConnectorConfiguration | SetMaxImageSize (Size maxSize) |
Defines maximum image size for the connector. More... | |
ConnectorConfiguration | SetDefaultImageQuality (ImageQuality quality) |
Defines default image quality of JPEG images for the connector. The default quality has value of 80. More... | |
ConnectorConfiguration | SetSizeDefinitions (params SizeDefinition[] sizeDefinitions) |
Sets size definitions to the connector. More... | |
ConnectorConfiguration | SetCheckSizeAfterScaling (bool enable) |
Defines whether a file size will be checked after image resize during Upload command execution. More... | |
ConnectorConfiguration | SetMaxFileSize (long maxFileSize) |
Defines the maximum file size that may be uploaded to the connector. More... | |
ConnectorConfiguration | SetOverwriteOnUpload (bool enable) |
Defines whether Upload command will overwrite files. More... | |
ConnectorConfiguration | SetDisallowUnsafeCharacters (bool enable) |
Defines whether to disallow creating folders and uploading files whose names contain characters that are not safe on an IIS web server. More... | |
ConnectorConfiguration | SetCheckDoubleExtension (bool enable) |
Whether to allow for files with double file extension. More... | |
ConnectorConfiguration | SetSecureImageUploads (bool enable) |
Defines whether to perform additional checks when uploading image files. More... | |
ConnectorConfiguration | SetKeyValueStoreProvider (IKeyValueStoreProvider keyValueStoreProvider) |
Sets a IKeyValueStoreProvider for the connector. More... | |
ConnectorConfiguration | SetProxyCacheSeconds (int seconds) |
Configures cache lifetime for Proxy command. More... | |
Defines connector's configuration.
|
inline |
Constructs a new instance of ConnectorConfiguration.
|
inline |
Adds AclRule to the connector.
aclRule | An instance of AclRule to add. |
|
inline |
Adds a backend to the connector.
name | A name of the backend. Must be non-empty and unique. |
fileSystem | An instance of the file system used by this backend. |
baseUrl | Base URL for backend. |
isProxy | A boolean telling if backend should generate URLs that point to Proxy command. |
|
inline |
Adds a backend to the connector.
Proxy backends use connector's Proxy
command to access it's resources.
This is a powerful option that allows to serve any files stored in CKFinder. Creating links to files for your web page may be difficult, or even impossible in some cases (for example when files are stored on a private FTP server, or files are not in the web server root folder). This method tells CKFinder to create links to files using the Proxy
command.
Serving files this way has the following advantages:
The disadvantage of this approach is that all links to files will be dependent on the CKFinder connector, so if you decide to remove CKFinder one day, the links will simply stop working.
name | A name of the backend. Must be non-empty and unique. |
fileSystem | An instance of the file system used by this backend. |
|
inline |
Adds ResourceType to the connector.
resourceTypeName | A name of the ResourceType. Must be non-empty and unique. |
resourceBuilderAction | An action to build the ResourceType. See ResourceTypeBuilder. |
|
inline |
Gets a backend with given name.
backendName | A name of the backend. |
|
inline |
Removes AclRule from the connector.
aclRule | An instance of AclRule to remove. |
|
inline |
Removes a backend from the connector.
backendName | A name of the backend. |
|
inline |
Removes ResourceType from the connector.
resourceTypeName | A name of the ResourceType. |
|
inline |
Whether to allow for files with double file extension.
Due to security issues with Apache modules it is recommended to leave checkDoubleExtension enabled.
enable | Whether to allow for files with double file extension. |
|
inline |
Defines whether a file size will be checked after image resize during Upload
command execution.
enable | Whether a file size should be checked after image resize. |
|
inline |
Defines default image quality of JPEG
images for the connector. The default quality has value of 80.
This is used for resized images that don't define their own quality.
quality | A default quality. |
|
inline |
Defines whether to disallow creating folders and uploading files whose names contain characters that are not safe on an IIS web server.
Increases the security on an IIS web server.
enable | Whether to disallow creating folders and uploading files with unsafe names. |
|
inline |
Defines the maximum difference in width and height between cached and requested resized image.
pixels | The maximum difference in width and height in pixels between cached and requested image. |
percent | The maximum difference in width and height in percent between cached and requested image. |
|
inline |
Sets a IKeyValueStoreProvider for the connector.
keyValueStoreProvider | An instance of IKeyValueStoreProvider. |
|
inline |
Defines the maximum file size that may be uploaded to the connector.
maxFileSize | A maximum file size in bytes. |
|
inline |
Defines maximum image size for the connector.
maxSize | A maximum allowed size. |
|
inline |
Defines whether Upload
command will overwrite files.
enable | Whether Upload command should overwrite files. |
|
inline |
Configures cache lifetime for Proxy
command.
seconds | An amount of seconds for cache header. |
|
inline |
Defines whether to perform additional checks when uploading image files.
The check is performed against files with image file's extensions and will return error when given file is not a valid image.
enable | Whether to perform additional checks when uploading image files. |
|
inline |
Sets size definitions to the connector.
sizeDefinitions | An array or list of size definitions. |
|
inline |
Defines which backend should be used for storing thumbnails.
Provided backend must be registered using AddBackend or AddProxyBackend method.
backendName | A name of the backend used for thumbnails. |
thumbnailsPath | A path to thumbnails in the backend. |
|
inline |
Sets allowed thumbnail sizes for the connector.
allowedSizes | An array or list of allowed sizes. |