Use FileBrowser in sidebar to select a file for a plugin tab

In the following plug-in (Autoprint - GitHub - chof747/octoprint-autoprint) the user can select a file in any folder to schedule for later printing. Currently the selection of the file works via two drop down menus (one to select the folder the other one to select the file in that folder). I wonder if there is the opportunity to use (a) the file browser in the sidebar or (b) to invoke a kind of a file selection dialog in the web interface.

a. Direct interaction with the sidebar file browser could e.g. be done simply by catching the click or selection event of the browser, when the user clicks on a file name or by adding an extra mini button to the file entry. - Are there any hooks or api calls available?

b. Is there an existing dialog window that brings up the file browser and allows selection of a specific file? Or is there access to the file browser component that I can mesh up into such a dialog?

Thanks in advance
Christian

There must be because the plugin, Arc-Welder adds an extra mini button.

This is how I do it in print scheduler plugin.

1 Like

Thanks a lot that does the trick for me.
I used it in the latest release of the autoprint plugin to enable selecting files directly from the file browser on the left side bar.

BR
Christian