isExtensionValid is not precise

Thread is closed for posting
2 posts, 0 answers
  1. ManniAT
    ManniAT avatar
    885 posts
    Member since:
    Nov 2003

    Posted 27 Apr 2009 Link to this post


    I messed around a few hours today why my uploaded file is always under InvalidFiles.
    My Client validation (from help) looks like this:
    function validateRadUpload(source, e)  
       e.IsValid = false;  
       var upload = $find("<%= rulThumb.ClientID %>");  
       var inputs = upload.getFileInputs();  
       for (var i = 0; i < inputs.length; i++)  
           //check for empty string or invalid extension  
           if (inputs[i].value != "" && upload.isExtensionValid(inputs[i].value))  
               e.IsValid = true;  
    My AllowedFileExtensions was set to "jpg,gif,png".
    So my client always tells me OK - but on the server I get the file in InvalidFiles.
    I took a look at a lot of things - but not on the extensions - because they are OK - told me the isExtensionValid :)
    The problem (you telerik guys know my error) was with AllowedFileExtensions - the must be ".jpg,.gif,.png" - so it was the dot I've been missing.

    So far so good; my fault - but isExetensionValid should check in the same way as the "server validation" does I guess!


  2. Veselin Vasilev
    Veselin Vasilev avatar
    2992 posts

    Posted 01 May 2009 Link to this post

    Hi ManniAT,

    Yes, you are right. We will fix the problem and it will be included in the latest internal builds next week.

    Thank you.

    Best wishes,
    Veselin Vasilev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top