I am having an dowload button and clicking that internally an a file is created and saved to s3 and s3 url is returned
So i have s3url with me. How can i download it as part of the method only
Attaching the method
private void createFileDownloadBtn() {
paceCM360ReportTable.addGeneratedColumn("Download", row -> {
Button button = uiComponents.create(Button.NAME);
button.setCaption("Download");
button.setStyleName("custom-buttons");
button.addClickListener(clickEvent -> {
try {
String sampleS3Url = paceCM360Controller.getSampleFileS3Url(row.getId());
downloader.download();
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
});
return button;
});
}