Cute Editor for ASP

Restricting image uploads by size

How to limit the size of the image files?



You can easily limit the size of the image files 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_Files/Configuration/Security folder. In security policy file you can find the MaxImageSize element which contains the value of max image file upload size limit (in kbs).  By default, it contains the following value:


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

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

For example:

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

2. Programmatically limit the size of the image files


Example:

editor.MaxImageSize = 300