Overview
WebFileManager has a number of configuration options or variables that may be used to control appearance and functionality. All of these variables have default values and, in some cases, the availability of variables and their values may vary depending on other variables.
By default, WebFileManager operates in a "locked down" mode where it is only possible to view folder and file listings. To enable a specific item of functionality, it has to be manually configured. For example, to enable folder creation, the FolderCreate variable must be enabled.
IIS Permissions
To be able to use any file system actions - like folder creation, file deletion etc - the user account or IIS AppPool used for the host IIS website must have corresponding permissions. Simply enabling functionality within WebFileManager will not enable to corresponding security permission in Windows.
For example, if you enable the FileDelete variable, you must enable File Delete permissions for your IIS website.
Defining Variable Values
WebFileManager configuration values are defined through the Config property of the WebFileManager control. It is recommended that these values are defined at the Load event in the ASP.Net Page Cycle and are redefined even on Postbacks.
The following example shows the simplest configuration
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
' WebFileManager configuration
WebFileManager.Config.BaseFolderPath = "~/user"
End Sub
Configuration Variables
Configuration variables may be categorised as follows:
Group |
Description |
Core Permissions |
The variables required for WebFileManager to work. |
Generic IO |
Generic FileSystem and IO configuration variables |
Files |
Variable options for managing files including read/write and upload permissions |
Folders |
Variable options for managing folders including write, move and rename permissions |
User Interface |
User Interface (UI) options |
3rd Party Integration |
Generic options for integrating WebFileManager with third party plugins and controls |
ckEditor Integration |
Options for integrating WebFileManager with ckEditor. |
Core Variables
BaseFolderPath
Name |
BaseFolderPath |
Type |
String |
Values |
An ASP.Net root relative virtual path of the root folder to be used in WebFileManager.
|
Default |
~/user |
Defines the base or root folder path for WebFileManager. All files and folders accessible by WebFileManager must be descendants of this path.
For example:
WebFileManager.Config.BaseFolderPath = "~/myfiles"
CurrentPath
Name |
CurrentPath |
Type |
String (ASP.Net Url) |
Values |
An ASP.Net root relative url
|
Default |
If nothing is specified or an invalid or unrecognised Url is specified, then the value of BaseFolderPath is used. |
Defines the url or folder of the current folder being viewed in WebFileManager. If not defined, WebFileManager will use the value specified for BaseFolderPath.
The value of CurrentPath must always be a descendant or equal to BaseFolderPath. If an an unrecognised or invalid path is used, WebFileManager will default to the value of BaseFolderPath.
LogPolicy
Name |
LogPolicy |
Type |
Enumeration |
Values |
None
All
ErrorsOnly
|
Default |
All |
Defines the policy controlling the information written to the log file. The following table shows the permitted values.
Value |
Description |
None |
Nothing is logged |
All |
Every recorded action or event is logged. |
ErrorsOnly |
Only error events are logged. |
ParentWebFormUrl
Name |
ParentWebFormUrl |
Type |
String (ASP.Net root relative Url) |
Values |
An ASP.Net root relative url
|
Default |
If nothing is specified, WebFileManager will automatically determine this value. |
Defines the ASP.Net root relative Url of the parent WebForm containing the WebFileManager control. If this is not defined, then it will be automatically determined. If you are using WebFileManager is a CMS or an application using rewritten Urls, it is recommended that this value is specified.
For example:
WebFileManager.Config.ParentWebFormUrl = Request.AppRelativeCurrentExecutionFilePath
Generic IO
FileSystemObjectCopy
Name |
FileSystemObjectCopy |
Type |
Boolean |
Values |
True or False
|
Default |
False |
When this variable is enabled (set to True) it is possible to copy file system objects like files and folders within WebFileManager.
This variable has no effect if the IIS permissions for the host website are configured to allow write operations.
FileSystemObjectMove
Name |
FileSystemObjectMove |
Type |
Boolean |
Values |
True or False
|
Default |
False |
When this variable is enabled (set to True) it is possible to move file system objects like files and folders within WebFileManager.
This variable has no effect if the IIS permissions for the host website are configured to allow write and delete operations.
File Variables
FileDelete
Name |
FileDelete |
Type |
Boolean |
Values |
True or False
|
Default |
False |
When this variable is enabled (set to True) it is possible to delete files within WebFileManager.
This variable has no effect if the IIS permissions for the host website are configured to allow delete file operations.
FileRename
Name |
FileRename |
Type |
Boolean |
Values |
True or False
|
Default |
False |
When this variable is enabled (set to True) it is possible to rename files within WebFileManager.
This variable has no effect if the IIS permissions for the host website are configured to allow this action.
FileUploadMode
Name |
FileUploadMode |
Type |
Enumeration |
Values |
Disabled
Standard
Plupload
|
Default |
Disabled |
Defines the policy controlling whether or not file uploads should be enabled in WebFileManager. If enabled, is recommend that Plupload is used as Standard may prove unreliable with large files or slow internet connections.
This variable has no effect unless the IIS permissions for the host website permitted file write operations.
The following table shows the permitted values.
Value |
Description |
Disabled |
File Upload functionality is not available |
All |
Upload via the inbuilt ASP.Net functionality |
Plupload |
Upload using Plupload |
FileDownload
Name |
FileDownload |
Type |
Boolean |
Values |
True or False
|
Default |
False |
When this variable is enabled (set to True) it is possible to download files through WebFileManager.
This variable has no effect if the IIS permissions for the host website are configured to allow file reading.
Folder Variables
FolderCreate
Name |
FolderCreate |
Type |
Boolean |
Values |
True or False
|
Default |
False |
When this variable is enabled (set to True) it is possible to create folders within WebFileManager
This variable has no effect if the IIS permissions for the host website are configured to allow folder creation.
FolderDelete
Name |
FolderDelete |
Type |
Boolean |
Values |
True or False
|
Default |
False |
When this variable is enabled (set to True) it is possible to delete folders - and their contents - within WebFileManager
This variable has no effect if the IIS permissions for the host website are configured to allow folder and file deletion.
FolderRename
Name |
FolderRename |
Type |
Boolean |
Values |
True or False
|
Default |
False |
When this variable is enabled (set to True) it is possible to rename folders within WebFileManager
This variable has no effect if the IIS permissions for the host website are configured to allow folder renaming.
User Interface Variables
ImageLightBox
Name |
ImageLightbox |
Type |
Boolean |
Values |
True or False
|
Default |
False |
When this variable is enabled (set to True) then the image Lightbox functionality is enabled. This functionality uses LightBox by Lokesh Dhakar
ImageRotation
Name |
ImageRotation |
Type |
Boolean |
Values |
True or False
|
Default |
False |
When this variable is enabled (set to True) then image rotation and flipping functionality is enabled.
Caution: this functionality is currently experimental and may not work. It requires file system modify permissions.
ListingMode
Name |
ListingMode |
Type |
Enumeration |
Values |
Listing
Thumbnail
|
Default |
Listing |
Defines the listing style in WebFileManager. The following table shows the permitted values.
Value |
Description |
Listing |
Shows standard list of files and folders |
Thumbnail |
Shows a thumbnail image list of files and folders |
OperatingMode
Name |
OperatingMode |
Type |
Enumeration |
Values |
Inline
ckEditor
ParentTextBoxControl
ParentListBoxControl
|
Default |
Inline |
Defines the operating mode of WebFileManager. This is primarily used to define whether WebFileManager is working a standalone file manager or is integrated into another plugin or control. The following table shows the permitted values.
Value |
Description |
Inline |
Standalone File Manager |
ckEditor |
Used when WebFileManager is integrated into ckEditor as its' default file manager |
ParentTextBoxControl |
Used when WebFileManager is integrated into a webform to populate a specified TextBox (using ParentControlId) with the path to a selected file. |
ParentListBoxControl |
Used when WebFileManager is integrated into a webform to populate a listbox (using ParentControlId) with the path to a selected file. |
UIMode
Name |
UIMode |
Type |
Enumeration |
Values |
Inline
InputBox
|
Default |
Inline |
Defines the user interface (UI) mode of WebFileManager. This is primarily used to define the user interface container of WebFileManager. This variable typically only applies when WebFileManager is integrated in Calzada Media products.
The following table shows the permitted values.
Value |
Description |
Inline |
The WebFileManager control is not encapsulated in any user interface container |
InputBox |
WebFileManager is encapsulated within a CalzadaMedia.Web inputbox container. |
Generic Third Party Integration
ParentControlId
Name |
ParentControlId |
Type |
String |
Value |
The Id of an ASP.Net Control |
Default |
Empty |
This configuration variable is used when WebFileManager is integrated into a form to populate the value of either a Textbox or ListBox.
- For a TextBox, the variable OperatingMode must be set to ParentTextBoxControl
- For a ListBox, the variable OperatingMode must be set to ParentListBoxControl
For this functionality to work correctly, the ClientIdMode property for the relevant WebControl must be set to static. For example:
<asp:ListBox ID="lbImages" runat="server" ClientIDMode="Static" Width="100%" Rows="10" />
This variable is not required with ckEditor integration.
ckEditor Integration
ckEditorFuncNum
Name |
ckEditorFuncNum |
Type |
String |
Value |
n/a |
Default |
Empty |
The value of this variable is defined by ckEditor when it invokes WebFileManager.
ckEditorControlId
Name |
ckEditorControlId |
Type |
String |
Value |
n/a |
Default |
Empty |
The value of this variable is defined by ckEditor when it invokes WebFileManager.
ckEditorType
Name |
ckEditor |
Type |
String |
Value |
n/a |
Default |
Empty |
The value of this variable is defined by ckEditor when it invokes WebFileManager.