How to limit file types uploaded

4 posts, 1 answers
  1. Al
    Al avatar
    203 posts
    Member since:
    Oct 2006

    Posted 13 Aug 2015 Link to this post

    Hi,

    In my aspx, I have tried setting 'AllowedFileExtensions='.xls,.xlsx' and <FileFilters><FileFilter Exntensions='xls,xlsx'> but neither seem to have any effect - please advise.

  2. Dimitar
    Admin
    Dimitar avatar
    281 posts

    Posted 13 Aug 2015 Link to this post

    Hi,

    You may browse the RadAsyncUpload Overview and Validation demos which show how file extensions validation could be implemented. I hope that they will get you in the right direction.

    Regards,
    Dimitar
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Al
    Al avatar
    203 posts
    Member since:
    Oct 2006

    Posted 14 Aug 2015 Link to this post

    Thanks Dimitar - so if I understand correctly it is not possible to limit the type of file that is selected, instead I need to ​validate after the file is selected and then ​handle the types from there on?
  5. Answer
    Dimitar
    Admin
    Dimitar avatar
    281 posts

    Posted 14 Aug 2015 Link to this post

    Hi,

    Yes, this is correct. You cannot limit the type of file a user may try to select from the popup OS window. But you may validate if the chosen file matches the required file type, specified by the allowed extensions.

    Regards,
    Dimitar
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top