OnClientValidationFailed function for checking if failure due to file being uploaded is open

2 posts, 0 answers
  1. JJ
    JJ avatar
    21 posts
    Member since:
    Oct 2012

    Posted 14 Mar 2013 Link to this post

    Hi, I am using the RadAsyncUpload without enabling plugins, so I am using straight-up javascript on my page. In other words I have the property DisablePlugins="True".

    My problem is that I can not distinguish the reason for error when the user atempts to upload a file that happens to be open at the time of the upload attempt, essentially this is a file-sharing error.

    I know that you can distinguish the difference from the wrong extension and the max size errors by this post:


    I cannot, however, find javascript code that will distinguish these two possible errors:

    1) wrong extension
    2) max file size

    ...as well as

    3) file-sharing (while the file is open and upload attempted on it)

    All three at once.


    There seem to be solutions if you are using Silverlight, but if you are not, you do not have access to same objects and properties that you would if I was assuming the use of Silverlight.
  2. Plamen
    Plamen avatar
    2725 posts

    Posted 19 Mar 2013 Link to this post


    In such scenarios we recommend using OnClientFileUploadFailed event, check the error message you are getting and do your custom functionality after that.

    I have tested the scenario described with DisablePlugins with .docx file opened in the same time in Word by could not achieve any error. Would you please elaborate a little bit what kind of file are you using to observe the issue so we could be more helpful?

    Kind regards,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. DevCraft R3 2016 release webinar banner
Back to Top