Site Map | About Us | Contact Us  
 The same content in Microsoft HTML help file format is included in the download package.

Filtering Folder and Files

It is often necessary to restrict the FileExplorer to only display certain files. For example, an image browser wish to only display image files.

Filtering files by extension

To filter files by extension, set the FileExplorer's AllowedExtension property. Multiple extensions can be separated by "|", for example, ".gif|.jpg".

AllowedExtension applies to both file listing and file upload. When user tries to upload a file with an extension that does not match AllowedExtension, an error message will be displayed. To customize the error message, handle the AJAXUploader control's ClientSideOnError event.

Filtering files by regular expression

EO.Web FileExplorer can also filter files/folders using regular expression. To use this feature, simply set FileNameFilter or FolderNameFilter to a regular expression. For example, setting FolderNameFilter to

2008[\w\W]*
only displays folders that start with "2008".

Custom Naming Scheme

It is often desired to rename user uploaded files based on certain file naming scheme to better organize all those files. EO.Web FileExplorer offers FileUploaded for that purpose. The event is fired for each uploaded file so that you can rename the file based on whatever name scheme your application uses. A sample in the sample package demonstrated how to rename each uploaded file to contain the date information.


Direct link to this topic