Increase Pdf File Size
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
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
>
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
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
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
>
this.FileManagerControl.Configuration.MaxUploadFileSize
Telerik.Sitefinity.Modules.Files.Web.UI.FilesView