Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Multiple Upload components on different pages #127

Description

@jonte14

Hi.

What I want to do principally is the following:

Page 1: main.py
Here the app is initiated etc

Page 2: upload_agreement.py
Here the user can upload a signed and filled agreement.
It should be put in a specific folder "data/$UserName/agreements"

Page 3: upload_images.py
Here the user can upload images (Multiple files)
These should be put in specific folder "data/$UserName/images"

I am able to make this work with 2 pages by getting the app instance with dash.get_app().
In this way I use du.configure_upload(app, output_folder)

However, with 3 pages, I have not found a solution.
The problem is that it seems that du.configure_upload(app, output_folder) must be present on the page where the du.Upload component is instantiated. However, when I add du.configure_upload(app, output_folder) to Page 3 I get the error:

AssertionError: View function mapping is overwriting an existing endpoint function: get

So it seems that the endpoint is defined globally, but still, the du.configure line must be present on each page where I use du.callback. But I cannot have this line present on all pages since that overwrites the endpoint of dash-uploader.

Is there a workaround?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions