OnClientProgressBarUpdating Event Problem in localhost

Thread is closed for posting
2 posts, 0 answers
  1. nsrikanth 2009
    nsrikanth 2009 avatar
    39 posts
    Member since:
    Apr 2010

    Posted 14 Jul 2010 Link to this post

    hi

    OnClientProgressBarUpdating is Event is not firing in the localhost for small size file(6MB) .this event is used to check the file size at client side.when we try large file(100MB) this Event is working in localhost.

     <telerik:RadScriptManager runat="server" ID="ScriptManager1">
        </telerik:RadScriptManager>

        <script type="text/javascript">

            function checkUploadedFilesSize(progressArea, args) {
                //progressArea.confirmed is a custom variable,
                // you can use another if you want to
                
                if (!progressArea.confirmed && args.get_progressData().RadUpload.RequestSize > 1000000) {
                    if (confirm("The total size of the selected files" +
                     " is more than the limit." +
                     " Do you want to cancel the upload?")) {
                        progressArea.cancelRequest();
                    }
                    else {
                        progressArea.confirmed = "confirmed";
                    }
                }
            }
        </script>

        <div>
            <telerik:RadProgressManager runat="server" ID="RadProgressManager1" />
            <telerik:RadUpload runat="server" ID="RadUpload1" >
            </telerik:RadUpload>
            <telerik:RadProgressArea runat="server" ID="RadProgressArea1" OnClientProgressUpdating="checkUploadedFilesSize">
            </telerik:RadProgressArea>
            <asp:Button runat="server" ID="Button1" Text="Upload" />
        </div>
    above code is downloaded from Telerik forums(file name 154505_progressbar)

    thanks
    srikanth.n
  2. T. Tsonev
    Admin
    T. Tsonev avatar
    2770 posts

    Posted 21 Jul 2010 Link to this post

    Hi,

    I can confirm that the file size validation can be unreliable when working with too small files and on localhost. We recommend you to verify the file size on the server as well.

    RadAsyncUpload, on the other side, can reliably verify the file size on the client as it's using Flash for the actual uploading. We recommend using it if size validation on the client is important.

    I hope this helps.

    Greetings,
    Tsvetomir Tsonev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top