CuteEditor for .NET

Limiting Image Upload Folder Size

How to Limit Image Upload Folder Size



You can easily limit the size of image upload folder using the following methods:

1: Edit security policy file:


The security policy file (default.config, admin.config and guest.config) can be found in the /CuteEditor/Configuration/Security folder. In security policy file you can find the MaxImageFolderSize element which contains the value of max image file upload size limit (in kbs).  By default, it contains the following value:


<
security name="MaxImageFolderSize">100</security>
  

You can modify the MaxImageFolderSize element to meet your own requirements.

For example:

<security name="MaxImageFolderSize">200</security>


2: Programmatically limit the size of the image upload folder:


C# Example:

Editor1.Setting["security:MaxImageFolderSize"]= "200";
or
Editor1.SetSecurityMaxImageFolderSize= "200";


VB Example:

Editor1.Setting("security:MaxImageFolderSize")= "200"
or
Editor1.SetSecurityMaxImageFolderSize= "200"