Catching upload error on client side

Thread is closed for posting
8 posts, 0 answers
  1. chirag
    chirag avatar
    29 posts
    Member since:
    Jan 2008

    Posted 26 Aug 2008 Link to this post

    Hi,

    How can I trap/catch an unknown upload failure on client side and display custom error message/feedback to the user?

    I'm using RadUpload And RadProgressArea controls. I display progress bars.
    I don't have exact error details, but I remember when an upload failed, a huge javascript alert box was displayed with all technical jargons.
    I want to catch that and display custom/user-friendly error message to user.

    We can assume we are talking about timeout. I know I can set the maxrequestlength and session time limit in web config.

    Thanks,
    Chirag
  2. Erjan Gavalji
    Admin
    Erjan Gavalji avatar
    1455 posts

    Posted 27 Aug 2008 Link to this post

    Hi chirag,

    Unfortunately currently RadUpload does not provide such a possibility. As this seems a nice feature, we will include it for the next official release. Please, open a formal support ticket if you would need an intermittent build and instructions.

    Kind regards,
    Erjan Gavalji
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Loopy
    Loopy avatar
    1 posts
    Member since:
    Sep 2008

    Posted 13 Oct 2008 Link to this post

    Hi Erjan,

    Do you expect that the update will be able to handle the 404 error when an upload file is larger than the maxrequestlength?
  5. Erjan Gavalji
    Admin
    Erjan Gavalji avatar
    1455 posts

    Posted 14 Oct 2008 Link to this post

    Hi,

    Unfortunately the answer is "no". The Max File Size Exceeded (and the Page Not Found error respectively) is thrown at a higher level of the ASP.NET Operation. To my regret RadUpload cannot handle that.

    Kind regards,
    Erjan Gavalji
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Scott
    Scott avatar
    45 posts
    Member since:
    Apr 2008

    Posted 20 Oct 2008 Link to this post

    Just curious how are other users handling upload errors when file exceeds maxrequestlength.  I can't find a way to let users know that they are uploading a file that's larger than allowed.

    Please advise on how you're talking care of this issue. Thanks.
  7. Erjan Gavalji
    Admin
    Erjan Gavalji avatar
    1455 posts

    Posted 21 Oct 2008 Link to this post

    Hi Scott,

    There are two possible approaches.
    The first one is just informative - add a label around the RadUpload instance, which will display the maximum allowed size.
    The other approach is to use the client-side file size checking approach. Please note, that the latter depends on the asynchronous progress update Ajax calls and some the data gets uploaded before the client-side event is triggered. That means that on localhost validation might not occur if uploading relatively small files (e.g. <5MB).

    You can use both the approaches to make best client experience.

    I hope that helps.

    Kind regards,
    Erjan Gavalji
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  8. Scott
    Scott avatar
    45 posts
    Member since:
    Apr 2008

    Posted 21 Oct 2008 Link to this post


    "The first one is just informative - add a label around the RadUpload instance, which will display the maximum allowed size."

    I have that label, but some users don't read it or ignore it.  So, they upload a much bigger size, how do I show a friendly error page or message?  When they upload a bigger size than maxrequestlength, it won't even attempt to upload, it simply errors out immediately.
  9. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 22 Oct 2008 Link to this post

    Hi Scott Rupp,

    I am afraid we cannot do anything in this case to prevent that error.

    Regards,
    Veselin Vasilev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017