Replies: 1 comment
-
Hi @xxdxxd , thank you for the question. Unfortunately the current versions of dash-uploader can only support one upload component per app. See, for example #35 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I tried to use multi page dash app feature (Example: Simple Multi-Page App with Pages on https://dash.plotly.com/urls) to develop a dash app. Each page has a dash-uploader component.
In pageA.py, I did this on the top of the script:
dash.register_page(name,path='/doA')
app1 = dash.get_app()
UPLOAD_FOLDER_ROOT = r"C:\uploads"
du.configure_upload(app1, UPLOAD_FOLDER_ROOT)
In pageB.py,
If I do the following: I will get the error saying that
I did this on the top of the script:
dash.register_page(name,path='/doB')
app1 = dash.get_app()
UPLOAD_FOLDER_ROOT = r"C:\uploads"
du.configure_upload(app1, UPLOAD_FOLDER_ROOT)
Then the error is:
File "C:\myProject\env\lib\site-packages\flask\app.py", line 1358, in add_url_rule
raise AssertionError(
AssertionError: View function mapping is overwriting an existing endpoint function: get
If I comment out the du.configure_upload related lines as below,
dash.register_page(name,path='/doB')
#app1 = dash.get_app()
#UPLOAD_FOLDER_ROOT = r"C:\uploads"
#du.configure_upload(app1, UPLOAD_FOLDER_ROOT)
Then the error will be
File "C:\myProject\env\lib\site-packages\dash_uploader\callbacks.py", line 100, in add_callback
raise Exception(
Exception: The du.configure_upload must be called before the @du.callback can be used! Please, configure the dash-uploader.
================================
What do I need to do to fix this issue?
Can you provide a simple example for a multi pages dash app(two pages only), each page use a dash-uploader to show it can work?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions