✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

Adding sample files with dcc.Upload

Hi there,
I was wondering if anyone knew how to have a dropdown of sample files where the dashboard user can select specific datasets alongside the dcc.upload function.
Thank you!

You can place some files in decided directory. And then show the files list in dropdown.

Dropdown_FileNames = html.Div(children=[
dcc.Dropdown(
id=‘filesDropdown’,
options=,
value="",
placeholder="Place file in C:\filedir directory. Click Refresh and "
“select one of the file and click Upload.”,
style={‘width’: ‘80%’, ‘height’: ‘6px’, ‘margin’: ‘5px’ }
),

And then create a callback, to retrieve file names from the directory and output as “options” of dropdown.