How to Override AjaxUploader.GlobalMaxSizeKB size

Last post 08-15-2010, 8:19 PM by cutechat. 2 replies.
Sort Posts: Previous Next
  •  08-14-2010, 4:12 AM 63398

    How to Override AjaxUploader.GlobalMaxSizeKB size

    Hello Experts,
    I have added below key in my web.config file .
     
    1. <add key="CuteWebUI.AjaxUploader.GlobalMaxSizeKB" value="102400"/>  
    but it my single case i need to maintain the MaxSizeKB according to the user setting.
    on page load. but the following code is not overriding the config file .

     

    1. ajaxUploaderVideos.ValidateOption.MaxSizeKB = Utilities.GetMediaSettings().VideoUploadSizeKB;  

    Please tell  how can i override config key  in my page. thanks

     

  •  08-14-2010, 8:06 PM 63402 in reply to 63398

    Re: How to Override AjaxUploader.GlobalMaxSizeKB size

    Please try the following code:
    <%@ Page Language="C#" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
       <title>Untitled Page</title>
    </head>

    <script runat="server">  
     protected override void OnLoad(EventArgs e)      {  
          attachment1.ValidateOption.MaxSizeKB = 1111;  
          base.OnLoad(e);   
       }
    </script>

    <body>
        <form id="form1" runat="server">
        <CuteWebUI:UploadAttachments ID="attachment1" runat="server">      
        </CuteWebUI:UploadAttachments>
        </form>
    </body>
    </html>
    Regards,
    Eric
  •  08-15-2010, 8:19 PM 63404 in reply to 63398

    Re: How to Override AjaxUploader.GlobalMaxSizeKB size

    Hi,

    GlobalMaxSizeKB
    means the max size for all configuration and can not be overrided.
     
    We have added new CuteWebUI.AjaxUploader.DefaultMasSizeKB , please download the last version and use the DefaultMasSizeKB .
     
    Regards,
    Terry
     
View as RSS news feed in XML