How to download a file with Vaadin 10?
问题 I want to let user to download a file from server. I looked up for the solution and when trying to make an example - ended up with this: @Route("test-download") public class Download extends VerticalLayout { public Download() { Anchor downloadLink = new Anchor(createResource(), "Download"); downloadLink.getElement().setAttribute("download", true); add(downloadLink); } private AbstractStreamResource createResource() { return new StreamResource("/home/johny/my/important-file.log", this: