Setting maximum size for file uploads |
RichTextEditor limits the size of files to be uploaded to 1 megabytes. You can modify the maximum size for file uploads using the following methods:
Setting maximum size for file uploads by editing security policy file
The security policy file (default.config, admin.config and guest.config) can be found in the richtexteditor/config folder. In security policy file you can find the security setting MaxFileSize. This setting defines the largest size of file that can be uploaded.
MaxFileSize setting can go directly under the root <rteconfig> node of security policy file. In this case, this setting will apply to all dialogs. It can also be placed into <category> node. In this case, it will only apply to the specified dialogs.
You can modify this settings to meet your own requirements.
<security name="MaxFileSize">1024</security><!-- This setting applies all dialogs ("Gallery","Image","Document","Video","Template"). -->
<category for="Video"> <security name="MaxFileSize">2048</security><!-- This setting applies "Video" dialog only.--> </category>
<category for="Gallery,Image"> <security name="MaxFileSize">300</security><!-- This setting applies "Gallery","Image" dialogs only.--> </category>
Programmatically setting maximum size for file uploads
RichTextEditor provides a powerful method named Editor.SetSecurity that allows you programmatically manage the security settings.
$rte->SetSecurity("*", "*", "MaxFileSize", "1024"); <!-- This setting applies all dialogs ("Gallery","Image","Document","Video","Template"). -->
$rte->SetSecurity("Video", "*", "MaxFileSize", "2048"); <!-- This setting applies "Video" dialog only. -->
$rte->SetSecurity("Gallery,Image", "*", "MaxFileSize", "300"); <!-- This setting applies "Gallery","Image" dialogs only. -->
Send feedback about this topic to CuteSoft. © 2003 - 2012 CuteSoft Components Inc. All rights reserved.