I am having difficulties getting a dcc.Loading to interact with a dcc.Upload. I want the loader to be visible during the duration of downloading the file. Below is my code; I do not see any loading happening. Any feedback is appreciated.
Layout Code:
html.Div([
dcc.Loading(id='file-loader', type="default", children=[html.Div(
dcc.Upload(
id='upload-data',
children=html.Div([
'Drag and Drop or ',
html.A('Select Files')
]),
style={
'width': '800px',
'height': '50px',
'lineHeight': '50px',
'borderWidth': '3px',
'borderStyle': 'dashed',
'borderRadius': '5px',
'textAlign': 'center',
'margin': '20px',
'borderColor':'#009900'
},
# Allow multiple files to be uploaded
multiple=False
),),
]),
]),
Callback:
@app.callback(Output(“file-loader”, “children”))