Downloading a file randomly results in a f.txt file instead of the real file

public class ProjectReportDownloadLink extends Anchor implements ClickNotifier {

    public ProjectReportDownloadLink(Button button, String fileName, InputStreamFactory fileProvider) {
        this("", fileName, fileProvider);
        add(button);
        button.getStyle().set("color", Colors.WHITE);
    }

    private ProjectReportDownloadLink(String label, String fileName, InputStreamFactory fileProvider) {
        super(new StreamResource(fileName, fileProvider), label);
        getElement().setAttribute("download", fileName);
    }
}

You sure your computer isn’t infected by a virus? f.txt is a well known malware :poop:

More information https://stackoverflow.com/a/32738110

Pretty sure. This happens on two computers with 2 browsers. The application that provides the download link is my own. You mean the deployed application could have a malware running on it?

There is not ad anywhere on that side and the f.txt file only appears after clicking on download.

It doesn’t have to be the application, it can be any other tab

Maybe I just close the modal panel before the download is complete.