RadFileUpload with ProgressArea

Thread is closed for posting
4 posts, 0 answers
  1. Richard
    Richard avatar
    3 posts
    Member since:
    Jan 2011

    Posted 09 May 2011 Link to this post

    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);

     

     

        }

     

    }

     

     

     

  2. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 11 May 2011 Link to this post

    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.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Richard
    Richard avatar
    3 posts
    Member since:
    Jan 2011

    Posted 11 May 2011 Link to this post

    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,   

  5. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 16 May 2011 Link to this post

    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.

Back to Top