FileDownloader doesn't work on IE 11 (maybe also on 11+)

Hy guys, I am using vaadin 8 and I have a problem, to download a file from my web app.

To create the button to download, I have :

Button downloadCompanyDocument = new Button();
downloadCompanyDocument.setIcon(VaadinIcons.DOWNLOAD);
downloadResource = createFileResource(rd.getFileReference());
downloadResource.setFilename(rd.getFileReference().getFileId());

FileDownloader fileDownloader = new FileDownloader(downloadResource);
fileDownloader.extend(downloadCompanyDocument);

and “createFileResource” function is:

private StreamResource createFileResource(FileReference fileReference) {

        StreamResource sr = new StreamResource(new StreamSource() {

            @Override
            public InputStream getStream() {

                try {
                    return fileReferenceService.getInputStream(fileReference);

                } catch (IOException e) {
                    LOG.error(e.getMessage());
                    
                }
                return null;
            }
        }, null);

        sr.setCacheTime(0);

        return sr;
    }

When I click on the button, on Chrome, FF works fine, but doesn’t work in IE.

Please, give me a solution!

Thanks

Hi,

Comparing to the
docs example
, your code looks okay and I don’t see any particular reason why it’s not working.
Are there any errors in the browser console? Might also be worth to run the app in debug mode as well.

– Goran

Have you checked this one? https://github.com/vaadin/framework/issues/9100

Thanks!
I solved adding security header in my context.xml