Sitefinity ASP.NET CMS
Skip Navigation LinksSupport / Knowledge Base / How to enable larger file uploads

How to enable larger file uploads

To change the default value of MaxUploadFileSize property that gets/sets the maximum file size in bytes, allowed for uploading, you need to open the corresponding template (for example, ~/Sitefinity/Admin/ControlTemplates/Generic_Content/EditorTemplate.ascx is the template for the Generic Content public control) and set the new value in the RadEditor declaration like this:

<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 the maximum request filesize is globally controlled through the application web.config:

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

The maxRequestLength attribute specifies the limit for the input stream buffering threshold, in KB. This limit can be used to prevent denial of service attacks that are caused, for example, by users posting large files to the server.
To enable large file uploads, you need to change the value of this attribute to the largest allowed combined file size for your application. If someone selects and uploads files, with total size larger than maxRequestLength, s/he will get the "Page not found" error (which is the default error of the Framework).

If you use IIS 7 you should also modify requestLimits Element for requestFiltering (IIS Settings Schema) and maxAllowedContentLength attribute.

Article Info

Article relates to 3.2 and above
Created by Penka Ivanova
Last modified by Ivan Dimitrov
Related categories: General

About Telerik

Telerik, the publisher of Sitefinity CMS, is a leading vendor of ASP.NET AJAX, ASP.NET MVC, Silverlight, WinForms and WPF controls and components, as well as .NET Reporting and .NET ORMTFSCode Analysis and Web Application Testing tools. Building on its solid expertise in interface development and Microsoft technologies, Telerik helps customers build applications with unparalleled richness, responsiveness and interactivity. Created with passion, Telerik products help thousands of developers every day to be more productive and deliver reliable applications under budget and on time. Read more about Telerik

Copyright © 2002-2010 Telerik. All rights reserved. Powered by Sitefinity