### Feature and motivation

#11443 is a proposal to implement file download on the client bindings. However, to download a file you need to know the file name, and this might be tricky given that most of the time the application under test does not let you choose the name that will be used when the file is downloaded.

We should have an endpoint that lists the downloaded files in the configured download directory in Grid. Then the user can choose the name of the one they want to download.

### Usage example

Something along the lines of:

`/session/:sessionId:/se/file`

Which could return:

```json
[
	{
		"name":"input.txt",
		"timestamp": "<timestamp with creation date"
	},
	{
		"name":"anotherFile.txt",
		"timestamp": "<timestamp with creation date"
	}
]
```

But I am not 100% that is the W3C WebDriver response payload structure, we should adapt to that one. @titusfortner do you know?

The main challenge in this issue is to decide if we need to list files that belong to a session or if it is OK to list all downloaded files.
LOG.info("Binding additional locator mechanisms: " + names);
    }
    Json json = new Json();
    routes = combine(
      
      
      matching(req -> getSessionId(req.getUri()).map(SessionId::new).map(this::isSessionOwner).orElse(false))
        .to(() -> new ForwardWebDriverCommand(this))
        .with(spanDecorator("node.forward_command")),
      new CustomLocatorHandler(this, registrationSecret, customLocators),
      post("/session/{sessionId}/file")
        .to(params -> new UploadFile(this, sessionIdFrom(params)))
        .with(spanDecorator("node.upload_file")),
      post("/session/{sessionId}/se/file")
        .to(params -> new UploadFile(this, sessionIdFrom(params)))
        .with(spanDecorator("node.upload_file")),
      get("/session/{sessionId}/se/file")
        .to(params -> new DownloadFile(this, sessionIdFrom(params)))
        .with(spanDecorator("node.download_file")),
      get("/se/grid/node/owner/{sessionId}")
        .to(params -> new IsSessionOwner(this, sessionIdFrom(params)))
        .with(spanDecorator("node.is_session_owner").andThen(requiresSecret)),
      delete("/se/grid/node/session/{sessionId}")
        .to(params -> new StopNodeSession(this, sessionIdFrom(params)))
        .with(spanDecorator("node.stop_session").andThen(requiresSecret)),
      get("/se/grid/node/session/{sessionId}")
        .to(params -> new GetNodeSession(this, sessionIdFrom(params)))
        .with(spanDecorator("node.get_session").andThen(requiresSecret)),
      post("/se/grid/node/session")
        .to(() -> new NewNodeSession(this, json))