My dash app allows user to upload a file. The file is automatically processed . The upload and processing can take up to 90 sec. I want to let the user know that the system is working.
In my app the user makes first makes a select from a dropdown. Once they have selected an item from the drop down the file upload element is displayed.
The file processing works correctly and produce the expected results
Any idea what i am doing incorrectly?
Any idea how I can debug this?
Kind regards
Andy
dcc.Loading(
#id='loading', Loading should never have an id.
type="circle",
fullscreen=True,
#children=['a string'],
children=[
# html.Div(id="loadingOutput",
# children = [
dcc.Upload(
id='selectedFileUpload',
children=html.Div([
'Drag and Drop or ',
html.A('Select Files'),
]),
style={
'width': '300px',
'height': '60px',
'lineHeight': '60px',
'borderWidth': '1px',
'borderStyle': 'dashed',
'borderRadius': '5px',
'textAlign': 'center',
'margin': '10px'
},
# Allow multiple files to be uploaded
multiple=False
)],
), # loading
type or paste code here
Here is my call back
@callback(
Output(component_id='sampleCollectorStorageDict', component_property='data'),
Output(component_id='generatedRecordingStemDiv', component_property='children'),
Output(component_id='uploadDiv', component_property='hidden'),
Output(component_id='errorDiv', component_property='children'),
Output(component_id='resultsDiv', component_property='children'),
Input(component_id="patientNameDropdown", component_property='value'),
Input(component_id='selectedFileUpload', component_property='contents'),
State('selectedFileUpload', component_property='filename'),
State('selectedFileUpload', component_property='last_modified'),
State(component_id='sampleCollectorStorageDict', component_property='data')
)
def sampleCollectorControllerCallback(
name,
base64Data,
selectedFileUploadFileName,
selectedFileUploadTimeStamp,
sampleCollectorStorageDict ):
do stuf
display results section
return results children```