The telerik:FileFilter is not working

5 posts, 0 answers
  1. Jin
    Jin avatar
    80 posts
    Member since:
    Jun 2012

    Posted 12 Aug 2012 Link to this post

    I set the code is as below, the question is that why I still can see other file type while open file dialog?
      <FileFilters>
                            <telerik:FileFilter Description="Microsoft Office Document" Extensions="doc,docx" />
     </FileFilters>
  2. Plamen
    Admin
    Plamen avatar
    2733 posts

    Posted 15 Aug 2012 Link to this post

    Hi,

     
    Yes you are right file filtering doesn't work when neither Flash nor Silverlight upload modules are used as it is explained in this help topic. This is because browsers don’t provide native file filtering support at all. 

    Hope this will explain the issue.

    Regards,
    Plamen
    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. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mohammed
    Mohammed avatar
    87 posts
    Member since:
    Aug 2011

    Posted 15 Aug 2012 Link to this post

    Hi,
    from the documentation I can get that the file filter is not working in IE, FireFox only if they use serverlight.
    so if i use chrome or safari the file filter will not work ? 

    I don't know why it is not working but there is another upload control that has file filter in all browsers while using flash, serverlight or HTML 5. 

    http://ajaxuploader.com/demo/simple-upload-Validation.aspx 

    so why our RadAsyncUpload control doesn't support the same ? 


  5. Jin
    Jin avatar
    80 posts
    Member since:
    Jun 2012

    Posted 16 Aug 2012 Link to this post

    Currently, I want to remove all invalid file due to limited type. I know the RadAsyncUpload provide a client API named OnClientValidationFailed to handle it. If the control support multiple file select, while user select 4 invalid files, the method will be call 4 times. My question is how can I only alert a common message once instead of four times? Also about how to remove all links of invalid files, I refer your reply in http://www.telerik.com/community/forums/aspnet-ajax/async-upload/remove-link.aspx, I try your way, but the sample code is not correct. I think the correct code is as below:
     function validateCodeFile(sender, eventArgs) {
                sender.deleteFileInputAt(1);
            }

  6. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 16 Aug 2012 Link to this post

    Hi,

    @Mohammed
    I check the provided link and when the control is not using Silverlight/Flash module the filtering is not possible - it is a browser limitation. Please check the attached screenshot under Firefox. RadAsyncUpload control uses Silverlight/Flash/IFrame modules under IE browser in all other modern browsers our control is using a FileAPI module based on the File API HTML5.

    @Jin
    The FileValidationFailed event is fired for every of the uploaded files which does not pass the validation. It is not possible to fire it only once for all invalid files. Regarding the referenced example I changed it to work as expected, please review the attachment.

    Regards,
    Peter Filipov
    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017