With Dash, how to obtain a directory name from a file browser

I would like users of my Dash app to be able to select a directory on their local machine — not just one file – and obtain the relative path and name of that directory. Ideally I would get the names of files in the directory as well.

This scenario does not seem to be supported by the Dash dcc_upload widget, which ignores directories.I found a workaround on stackoverflow that uses the HTML input (type=file) form element. But that element appears absent from Dash HTML components.Can anyone help?