+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Increase Pdf File Size

Increase Pdf File Size

5 posts, 0 answered
  1. vivek
    vivek avatar
    14 posts
    Registered:
    06 May 2011
    23 Nov 2011
    Link to this post
    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
  2. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    23 Nov 2011
    Link to this post
    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
  3. vivek
    vivek avatar
    14 posts
    Registered:
    06 May 2011
    23 Nov 2011
    Link to this post
    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 

     

  4. vivek
    vivek avatar
    14 posts
    Registered:
    06 May 2011
    24 Nov 2011
    Link to this post
    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
  5. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    24 Nov 2011
    Link to this post
    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
5 posts, 0 answered