JupyterLab file chooser widget server-side

I’m writing a JupyterLab document widget extension.

I want the user to be able to choose a file from the server.

So I want a UI widget which says Choose File which has two modes of interaction:

  1. The user can drag and drop a file from the JupyterLab FileBrowser.
  2. The user can click, is shown a list of files on the server, and can select one.

Does this feature exist anywhere, as a Lumino widget, or in another project? Or do I have to write it myself?

(The Jupyter Notebook Markdown cells recently had the ability to do interaction #1, and I hope they will again soon when the bugs are fixed https://github.com/jupyterlab/jupyterlab/issues/8205 )


For #2, you could use : https://jupyterlab.readthedocs.io/en/stable/developer/ui_helpers.html#file-dialogs

1 Like

Thanks @fcollonval, I think that’s what I was looking for.

For further reference: https://jupyterlab.github.io/jupyterlab/filebrowser/modules/filedialog.html