dash-uploader icon indicating copy to clipboard operation
dash-uploader copied to clipboard

Using @app.callback for dash-uploader components

Open HyprValent opened this issue 1 year ago • 11 comments

Without going into too much detail, I want to use @app.callback in order to update three different outputs at once the uploading is completely done. This is the structure of the callback so far:

@app.callback([Output('callback-output', 'children'),
               Output("example-graph2", "figure"),
               Output("example-graph3", "figure")],
              [Input('dash-uploader', 'is_completed'),
               Input('dash-uploader', 'n_uploaded')])
def callback_on_completion(is_completed, filecount):
    if is_completed and filecount is not None:
        # code if the upload is completed

But if I try to run the app, I get the following errors: image

How can I use the is_completed and n_uploaded properties in order to run the callback?

HyprValent avatar Oct 05 '22 00:10 HyprValent