To create a new resource type you should append the following lines of code anywhere after the "ResourceType type;" line in the configuration file.
For example, if want to create a resource type named MSdocs which will only accept files with the "doc", "ppt" and "xls" extensions, restricting the file size to 2 megabytes:
type = ResourceType.Add( "MSdocs" ); type.Url = BaseUrl + "docs/"; type.Dir = BaseDir == "" ? "" : BaseDir + "docs/"; type.MaxSize = 2000; type.AllowedExtensions = new string[] { "doc", "ppt", "xls" }; type.DeniedExtensions = new string[] { };
The above options are described in the Built-in resource types section.
By default, CKFinder will use all the resources types including the new one you have just created. If you want to limit the CKFinder to use only your resource type you must place its name in the in the DefaultResourceTypes setting. For example:
DefaultResourceTypes = "MSdocs";