Interface DynamicFileDownloader.FileNameGenerator

Enclosing class:
DynamicFileDownloader
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface DynamicFileDownloader.FileNameGenerator
Generates name dynamically per request. Override for example to add timestamps to the names of the downloaded files or to configure response headers (executed during download, but before writing the actual response body).
  • Method Summary

    Modifier and Type
    Method
    Description
    getFileName(com.vaadin.flow.server.VaadinRequest request)
    Creates the filename for the downloaded files.
  • Method Details

    • getFileName

      String getFileName(com.vaadin.flow.server.VaadinRequest request)
      Creates the filename for the downloaded files. Called by the framework when download is requested by browser, just before the file body is generated.
      Parameters:
      request - the request object
      Returns:
      the file name to be used in the Content-Disposition header