This is a migrated thread and some comments may be shown as answers.

Only show pdf file type when selecting a file

1 Answer 208 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Jerry
Top achievements
Rank 1
Jerry asked on 14 Feb 2016, 01:18 AM

Is it possible to have the control only show *.pdf files when my users are selecting files?  I know I can set it to just accept *.pdf files and it shows a red dot if it isn't a pdf, but I want to eliminate an other files that are not pdf files when selecting.

 

Thank you

1 Answer, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 17 Feb 2016, 02:40 PM
Hello Jerry,

The desired functionality could be achieved, using the accept attribute, injected in the file input. Please consider the below implementation:

<script type="text/javascript">
           function pageLoad() {
               $telerik.$(".ruFileInput").attr("accept", "application/pdf")
           }
       </script>

Hope this would help.

Regards,
Nencho
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
Tags
AsyncUpload
Asked by
Jerry
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Share this question
or