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

RadFileUpload with ProgressArea

3 Answers 71 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 09 May 2011, 03:52 PM

The demos on this site are really terrible and largely useless.  

All I am trying to do is to upload images files, and display progress of upload (both indvidual and overall).

 

Does anyone have a WORKING example of this? (C#)  for the life of me, I cannot find ANY info on how to actually do this.

How do I query the progress of the current image file being uploaded?

When Uplaod Files Button Clicked:

 

 

foreach

 

(UploadedFile f in RadFileUpload1.UploadedFiles)

 

 

{

 

 

    string fPath = string.Empty;

 

 

 

    int i = 0;

 

 

    i++;

 

 

    fPath = Server.MapPath(

@"~\Scanned_Images") + @"\" + f.GetName();

 

 

    f.SaveAs(fPath,

true);
   /// Call some other loop here???????????

 

 

 

 

//    RIGHT HERE - HOW DOES PROGRESS BAR GET REFRESHED AND DISPLAYED????????????????? HOW DO I QUERY THE STATUS OF EACH FILE BEING UPLOADED?
}


Private Void SomeOtherLoop
{
// something like this???????????

 

 

    for

 

 

(int j = 0; j < 10000; j++)

 

 

    {

 

        context.CurrentOperationText =

 

"Uploading File " + j.ToString();

 

 

        context.PrimaryTotal =

 

Convert.ToString(j);   <===== how do I know % of file uploaded?

 

 

        context.SecondaryPercent = context.PrimaryTotal; <===== how do I know % of file uploaded?

 

        System.Threading.

 

Thread.Sleep(100);

 

 

    }

 

}

 

 

 

3 Answers, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 11 May 2011, 01:51 PM
Hi Richard,

The code that you have been using is used for custom progress monitoring, not for actual file upload monitoring. In order to monitor upload progress it is only needed to do the following:

1) Place RadProgressManager on the page
2) Place RadProgressArea on the page
3) Register the area's module and handler into the web.config
4) Upload file large enough in order to trigger the area. This part is a bit tricky. Please have in mind that on a localhost the upload speed is sometimes as fast as 20mb/s, and some small files are uploaded in less than a second. In order to trigger the area on a local host file as large as 50-60 mb might be needed.

Overall, I suggest that you take a look at the following demo. Please upload an image or two and observe the area showing and monitoring the progress.

Regards,
Genady Sergeev
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Richard
Top achievements
Rank 1
answered on 11 May 2011, 02:33 PM

Thank you. You know, I actually tried what you suggested as a "stab in the dark", but the progress area did not display so I discounted it.  The files I was uploading must not have been large enough. I will attempt this again using larger files.

That being said, I am puzzled that I could not find any OBVIOUS reference anywhere on your site, demos, etc., that makes it clear that the upload monitoring is done for you. You would never know it unless you happended to test with a large file. I assumed, after doing exactly what you suggested, that since the progress area did not display, that some custom monitoring would be required.

 

Perhaps I'm getting old and senile, but I have spent the last 3 days chasing my tail on this, either because your documentation on these controls did make it obvious enough, or I failed to see the forest through the trees.   Love your product, do not love the examples and documentation. Not clear enough. I often I have MORE questions after looking at your demos/examples, rather than fewer when looking for answers,   

0
Genady Sergeev
Telerik team
answered on 16 May 2011, 08:08 AM
Hi Richard,

Agree that sometimes the documentation is not enough concise and precise. We are constantly working on improving it, as well as the quality of the online demos. We will update the First Look RadUpload demo description so that it explains how the RadUpload/RadProgressArea combo works.

Greetings,
Genady Sergeev
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Upload (Obsolete)
Asked by
Richard
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
Richard
Top achievements
Rank 1
Share this question
or