How can I create a filter in the Upload browse?

Hi!
I have a question. I want to create a filter. By means of filter, I can filter between the files. For example, if I choose “pdf” in the filter then the Upload browse shows only .pdf files.
So, How can I set off it?

Any idea would be gratefully appreciated !

Hi,

HTML input elements have an “accept” attribute specifically for that purpose, but it’s not yet supported in Vaadin. It also doesn’t work in IE 9 or earlier.

There’s
ticket #8857
for it.

Hi,

EasyUploads add-on (in V7 branch) has an extension for Upload that you can use to configure accept filter:

https://github.com/mstahv/easyuploads/blob/master/src/main/java/org/vaadin/easyuploads/Html5FileInputSettings.java
https://vaadin.com/directory#addon/easyuploads

cheers,
matti

Thank’s. I will try the suggestions.