This is a migrated thread and some comments may be shown as answers.

OnClientProgressBarUpdating Event Problem in localhost

1 Answer 40 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
nsrikanth 2009
Top achievements
Rank 1
nsrikanth 2009 asked on 14 Jul 2010, 11:39 AM
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

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 21 Jul 2010, 01:18 PM
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
Tags
Upload (Obsolete)
Asked by
nsrikanth 2009
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or