Sitefinity ASP.NET CMS - Content Management System

Support Forum Thread

Home >  Support >  Forums home > Sitefinity 3.x > Set-up & Installation > Media/Flash manager upload file size

Reply
K, 6/12/2008 8:27:30 PM
I am currently evaluating 3.2 and noticed the Max file size allowed 204800 bytes when trying to upload a flash or media file.  Is it possible to change/increase the limit in the Media/Flash manager?
thank you,
KE


Reply
, 6/13/2008 3:11:54 AM
Hello Kamal,

All RadEditor dialogs have a MaxUploadFileSize property that gets/sets the maximum file size in bytes, allowed for uploading. The default value is 2048000 bytes. To change it, you should set a new value for the MaxUploadFileSize property in the RadEditor declaration. For example:

<telerik:RadEditor  
    runat="server"  
    ID="RadEditor1" 
    ContentAreaCssFile="~/Sitefinity/Admin/Themes/Default/AjaxControlsSkins/Sitefinity/EditorContentArea.css" 
    ToolsFile="~/Sitefinity/Admin/ControlTemplates/EditorToolsFile.xml" 
    EnableEmbeddedSkins="False" Skin="Sitefinity"  
    NewLineBr="False" 
    Height="360px"  
    Width="98%">  
    <ImageManager ViewPaths="~/Images" UploadPaths="~/Images" DeletePaths="~/Images" /> 
    <MediaManager ViewPaths="~/Files" UploadPaths="~/Files" DeletePaths="~/Files" MaxUploadFileSize="307200" /> 
    <FlashManager ViewPaths="~/Files" UploadPaths="~/Files" DeletePaths="~/Files" MaxUploadFileSize="307200" /> 

Also, please note that Sitefinity controls globally maximum request size through the project web.config:

 <system.web> 
    <!-- Sets the allowed upload file size --> 
    <httpRuntime maxRequestLength="51200" /> 
 ... 

For more information on maxRequestLength property, please refer to th following MSDN article.

Hope the information is helpful.

All the best,
Pepi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center

Reply
Briankb, 7/16/2008 2:16:26 PM
I can't find anything in the v3.1 web.config for Max length.

Can I add it or is it somewhere else?

Also what is the file path to the user control you provided the code sample from?

Reply
, 7/17/2008 4:09:51 AM
Hello Brian,

Sitefinity v3.1 uses the default maximum file upload size (4096 KB). That is why maxRequestLength attribute is not set explicitly in the project web.config file. But you can configure HTTP runtime settings by yourself. To achieve this you should add <httpRuntime> element in <system.web> section and set maxRequestLength attribute to the required value.

Regarding the example, it is valid for Sitefinity v3.2 and later and can be found in ~/Sitefinity/Admin/ControlTemplates/Generic_Content/EditorTemplate.ascx template. The same template in previous versions of Sitefinity is rather different because they use classic RadEditor control in contrast with v3.2 that is shipped with RadEditor for ASP.NET AJAX.

Also, note that to increase maximum file size for classic RadEditor in Sitefinity v3.1, you should open ~/Sitefinity/Admin/ControlTemplates/EditorConfigFile.xml file, find the following code and set the reguired values:

<property name="MaxImageSize">204800</property>      
<property name="MaxFlashSize">102400</property>      
<property name="MaxMediaSize">5242880</property>     
<property name="MaxDocumentSize">512000</property>       
<property name="MaxTemplateSize">204800</property>  

Here is a KB article you can have a look at:


All the best,
Pepi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center