Increase Pdf File Size

Posted by Community Admin on 04-Aug-2018 12:10

Increase Pdf File Size

All Replies

Posted by Community Admin on 23-Nov-2011 00:00

Hello,
I am usinfg sitefinity 4.0, i want to upload pdf file from Sitefinity backend.But File size is above 200 kb  thats why it not allowed me to uplaod the file..
Can u please help how i can increase the file upload size..........

Thanks & Regards
vivek kanse

Posted by Community Admin on 23-Nov-2011 00:00

Hello Vivek,

You can increase the maximum file upload limit by changing the FilesModule property in the Settings menu. Please check the attached image which shows where the setting can be found.

However the setting becomes available in version 4.1 SP2 build 1501. The workaround for versions prior to 1501 can be found bellow.

If you do not have any IIS limitations ( related to file uploads ) you can try adding the following code to your webconfig:

<system.webServer>
    <security>
        <requestFiltering>
            <requestLimitsmaxAllowedContentLength="40485760"></requestLimits>
        </requestFiltering>
    </security>

You also might the following article useful:

http://weblogs.asp.net/jeffwids/archive/2009/09/24/from-iis6-maxrequestlength-to-iis7-maxallowedcontentlengthfile-specifying-maximum-file-upload-size.aspx

http://support.microsoft.com/kb/295626

Kind regards,
Victor Velev
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 23-Nov-2011 00:00

Hello,
Thanks for ur reply...
I had tried ur solution but its not working.. My site is hosted on IIS 6.0 I have added following code in web.config
<system.web>

<

 

 

httpRuntime maxRequestLength="409600" />
</system.web>
but still its not working... 
should i restart the IIS or is there any solution for this?????

Thanks & Regards
Vivek kanse 

 

Posted by Community Admin on 24-Nov-2011 00:00

Hello,
I had tried ur solution but its not working..
Any updates on the same ? It's a little urgent please

Thanks & Regards
Vivek kanse

Posted by Community Admin on 24-Nov-2011 00:00

Hi Vivek,

Please do restart IIS.

We exposed a property in all versions ( starting from 1501 ), because the upload size limit of the files module cannot be easily changed ( only the limits of the media modules ). You can use FTP or VS to upload your files to your project folder. However if you upgrade to a newer version of Sitefinity you will be able to set the maximum file size to whatever you want.

However if you do not wish to upgrade your project ( which is highly recommended ) you can map the following template to your files module:

markup:

<%@ Control Language="C#" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Modules.Files.Web.UI" TagPrefix="sf" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" TagPrefix="sitefinity" %>
  
<sitefinity:ResourceLinks id="resourcesLinks" runat="server">
<sitefinity:ResourceFile JavaScriptLibrary="JQuery" />
<sitefinity:ResourceFile Name="Styles/Treeview.css" />
<sitefinity:ResourceFile Name="Styles/Grid.css" />
<sitefinity:ResourceFile Name="Styles/FileExplorer.css" />
<sitefinity:ResourceFile Name="Styles/Ajax.css" />
</sitefinity:ResourceLinks>
  
<sf:FileManager
ID="fileManager"
runat="server"
Width="100%"
CssClass="sfFileBrowser"
Skin="Sitefinity">
</sf:FileManager>
  
<script type="text/javascript">
$("body").addClass("sfNoSidebar sfFileExplorer");
  
$("#<%= fileManager.ClientID %> > div[id*=splitter]").addClass("sfSplitterWrapper");
$(window).bind("load resize", function()
setTimeout( function()
var newHeight = $(window).height()
- $(".sfHeader").eq(0).outerHeight(true)
- $(".sfBreadCrumb").eq(0).outerHeight(true)
- $("#<%= fileManager.ClientID %> .RadToolBar").eq(0).height()
- $(".sfFooter").eq(0).height();
  
$find("<%= fileManager.ClientID %>").get_gridPane().set_height(newHeight);
$find("<%= fileManager.ClientID %>").get_treePane().set_height(newHeight);
, 500);
);
</script>

you can set the filesize in the codebehind:

this.FileManagerControl.Configuration.MaxUploadFileSize

to whatever you like.

Also the ViewType is:

Telerik.Sitefinity.Modules.Files.Web.UI.FilesView

Regards,
Victor Velev
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed