Comments (1)
I managed to resolve my issue by unwrapping the du.callback
method within my own page definition.
The change is that instead of calling app.callback
which would have used DashProxy.callback
we now call callback
which is imported from dash
. By doing this we are bypassing the issue that the blueprint
attribute doesn't yet exist for the DashProxy
instance.
I will keep the issue as Open, since there still might be a fix or a documentation update within the dash-uploader
project to better accommodate integration with dash-extensions
.
Here is an example:
app.py:
from dash_extensions.enrich import DashProxy, ServersideOutputTransform
app = DashProxy(__name__, use_pages=True, transforms=[ServersideOutputTransform()])
file_upload.py:
import dash
from dash import html, Output
import dash_uploader as du
from dash_uploader.callbacks import create_dash_callback
import dash_uploader.settings as settings
app = dash.get_app()
du.configure_upload(app=app, folder='./uploads')
dash.register_page(__name__, path='/')
layout = html.Div(children=[
du_file_upload := du.Upload(id='du-file-upload'),
du_uploads := html.Div(id='du-uploads')
] )
def update_du_uploads(filenames):
return html.Ul([html.Li(filenames)])
dash_callback = create_dash_callback(
update_du_uploads,
settings,
)
callback(
Output('du-uploads', 'children'),
Input('du-file-upload', 'isCompleted'),
State('du-file-upload', 'fileNames'),
State('du-file-upload', 'upload_id')
)(dash_callback)
from dash-uploader.
Related Issues (20)
- Using @app.callback for dash-uploader components HOT 11
- Passing additional input to callback HOT 6
- Getting a maximum file size with default settings. HOT 4
- multi page issue HOT 2
- Multiple issues with Linux-Python3.6 and Windows-Python3.7
- module 'dash_uploader' has no attribute 'UploadStatus' HOT 3
- Multiple file upload: callback triggered only after first file uploaded HOT 1
- AttributeError: module 'packaging.version' has no attribute 'LegacyVersion' HOT 6
- How to get the lastModified value (supported by flow.js)?
- Uploader pauses after 5-6 files. Then the user has to click on Pause/Resume to continue
- Server files overlapping
- Does not work with CSRF
- Dash-uploader adds empty line to files, seems a dependency issue HOT 5
- dash-uploader background callbacks HOT 1
- possible to return only the local filepath on file explore HOT 6
- Multitple Upload components
- upload files to AWS S3 bucket using dash-uploader HOT 1
- AttributeError: module 'packaging.version' has no attribute 'LegacyVersion' HOT 1
- Multiple Upload components on different pages
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dash-uploader.