Hello everyone!
I have an upload-function in my application.
When the Upload window opens, I want, that the user only can select pdf-files.
I found the accept-attribute for the vaadin-upload tag,
so I tried this:
<vaadin-upload accept="application/pdf" _id="btnUpload"></vaadin-upload>
Sadly, it doesn’t work!
There is no selection of .pdf like in the example ‘Setting Restrictions on Files to Upload’ (the last one):
[Vaadin-Upload Examples]
(https://vaadin.com/components/vaadin-upload/html-examples#upload-basic-demos)
I have installed the vaadin-upload with bower install vaadin/vaadin-upload
I have seen, that you can set the file types in Java.
Upload upload = new Upload();
upload.setAcceptedFileTypes("image/jpeg", "image/png", "image/gif");
But when I try this, there doesn’t even appear a suggestion for the method.
Can somebody please help me!
That would be very, very glad!
Greetings,
Julia