I’m having some trouble adding the file download wrapper to a button, I’ve almost exactly copied the code from the example and it still isn’t working for me. Would browser choice or user settings not allow a download to happen?
Here’s my code:
FileDownloadWrapper buttonWrapper = new FileDownloadWrapper(new StreamResource("invoice.pdf", () -> new
ByteArrayInputStream("foo".getBytes())));
Button downloadButton = new Button("Download");
buttonWrapper.wrapComponent(downloadButton);
add(downloadButton);