Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to browse to a folder with plotly dash?

I am learning Python Dashboard. I know that there is a Dash core components upload allow to upload a file. What I need is load all of files in a folder. I would like to know how to use a core component to browse to a select folder then read all files in that folder.

Thanks in advance.

like image 867
ThangNguyen Avatar asked Oct 25 '18 02:10

ThangNguyen


1 Answers

You can use the dash_core_components.Upload component and set multiple=True to upload multiple files. Here is an example: https://dash.plotly.com/dash-core-components/upload.

This, however, uploads all the contents of all the files at once. What you cannot do with it is just get the contents of a folder, so that you can upload the files one by one.

However, since your question is about uploading all files in a folder, this should do it.

like image 61
Konstantin Avatar answered Oct 28 '22 12:10

Konstantin