Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Access to the server file system from the clients browser


I would like to know, if there is a possibility to access the dash servers file system from a clients browser like with Shyinyfiles for R-Shiny?

I already found browsepy for flask but have no idea. how to integrate it into my Dash application.
Thanks in advance!

In Dash, you can access the underlying Flask server with server = app.server. With that server instance, you can use any of the existing flask solutions for doing things like serving files.

In this case, you can serve files from a static folder with:

def serve_static(path):
    root_dir = os.getcwd()
    return flask.send_from_directory(os.path.join(root_dir, 'static'), path)