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

AsyncUpload with ProgressManager: how to stop polling the server

6 Answers 165 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Shukhrat Nekbaev
Top achievements
Rank 1
Shukhrat Nekbaev asked on 24 Mar 2011, 02:58 PM
Hi,

I have fully ajaxified app, inside 1 dynamically loaded user control I have async upload:
<telerik:RadAsyncUpload runat="server" ID="RadAsyncUploadElementAttachments"  MultipleFileSelection="Automatic"<BR>                        
MaxFileInputsCount="5" MaxFileSize="31457280" InputSize="50"  Width="100%"  OnFileUploaded="RadAsyncUploadElementAttachments_FileUploaded"<BR>                        
OnClientFilesUploaded="onClientFilesUploaded"  OnClientFileUploading="onClientFileUploading"  TemporaryFolder="" ></telerik:RadAsyncUpload>

Above I have:

<script type="text/javascript">
        function onClientFileUploading() {
            getRadProgressManager().startProgressPolling(); 
        }
  
        function onClientFilesUploaded() {
            //getRadProgressManager().hideProgressAreas();
        }
  
        Telerik.Web.UI.RadAsyncUpload.Modules.Flash.isAvailable = function () { return false; }
    </script>

Once I upload file, polling starts and contunies (I can see in Fiddler constant requests to /Telerik.RadUploadProgressHandler.ashx
When I upload another file, polling speed increases, I believe it's because getRadProgressManager().startProgressPolling();  is called again, another file upload - again, speed of polling increases.

ProgressManager and ProgressArea are in masterpage and are outside of any update panels:
<telerik:RadProgressManager ID="Radprogressmanager1" runat="server" RegisterForSubmit="false"  />
    <telerik:RadProgressArea ID="progressArea1" runat="server" Culture="(Default)" Height="200px" Skin="Default" Width="400px" style="position: absolute !important; top: 300px !important; left: 280px !important; z-index:10100 !important;"  />

Question is:how to stop it from polling, I would like to start/stop polling manually (this will also solve poll speed increase issue, I think)?

P.S.: getRadProgressManager().hideProgressAreas(); is commented out cause progress area automatically disappears when upload has completed. Also when I load another user control polling speed drops to initial speed (first file upload case)

Thanks!

6 Answers, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 29 Mar 2011, 11:08 AM
Hi Shukhrat,

Could you please specify which version of Telerik.Web.UI do you use. I am asking because from Q1 release, RadAsyncUpload can update RadProgressArea on its own, making RadProgressManager redundant.

Regards,
Genady Sergeev
the Telerik team
0
Shukhrat Nekbaev
Top achievements
Rank 1
answered on 29 Mar 2011, 11:10 AM
Hi Gena,

2011.1.315.40, latest afaik
0
Genady Sergeev
Telerik team
answered on 01 Apr 2011, 08:41 AM
Hi Shukhrat,

In this case, please remove the RadProgressManager declaration and leave the async upload to update the progress area on its own. Does the issue persist?

Best wishes,
Genady Sergeev
the Telerik team
0
Shukhrat Nekbaev
Top achievements
Rank 1
answered on 01 Apr 2011, 12:22 PM
Hi,

thx for reply.

I did that in masterpage:
<%--<telerik:RadProgressManager ID="Radprogressmanager1" runat="server" RegisterForSubmit="false"  />--%>
<telerik:RadProgressArea ID="progressArea1" runat="server" Culture="(Default)" Height="200px" Skin="Default" Width="400px" style="position: absolute !important; top: 300px !important; left: 280px !important; z-index:10100 !important;"  />

now on login screen (another page that doesn't have asyncupload, but uses same masterpage (yes, progress area was intentionally placed there) I get error: Couldn't fint an instance of RadProgressManager or RadAsyncUpload on the page etc), please see attachment. So, feels like I will need to move progress area and put it just above every async upload....?
0
Accepted
Genady Sergeev
Telerik team
answered on 05 Apr 2011, 03:49 PM
Hi Shukhrat,

Indeed, there might be implications if the area is on master page and there is no async upload in the content page. There are two workarounds to this problem. The first one is to move the area on the same page as RadAsyncUpload. The other, is to suppress the error message, here is how you can do this:

Telerik.Web.UI.RadProgressArea.prototype.get_progressManagerFound  = function() { return true; }

Place this code above the RadProgressArea declaration.

Kind regards,
Genady Sergeev
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
0
Shukhrat Nekbaev
Top achievements
Rank 1
answered on 05 Apr 2011, 03:54 PM
Hi,

yeah, that did the job, thanks, Gena! :)
Tags
AsyncUpload
Asked by
Shukhrat Nekbaev
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
Shukhrat Nekbaev
Top achievements
Rank 1
Share this question
or