1

I have been researching about uploading data (by external users) to my Dash app and it seems the only way is the dcc.Upload component (a drag-and-drop component on the UI side - https://dash.plotly.com/dash-core-components/upload) … To clarify it is this uploaded file that will be read into pandas and fed into the callbacks for analysis and visualisation.

I also read about Heroku simple-file-upload config (https://devcenter.heroku.com/articles/simple-file-upload) and the AWS S3 bucket (https://devcenter.heroku.com/articles/s3) as the necessary way to store static data uploaded to the app. Nowhere is it mentioned in the Dash dcc.Upload docs about the storage of the uploaded file, i.e. the web server part and the UI are not linked together in any documentation I could find.

Can anyone explain to a total web dev newbie, once deployed to Heroku, does the dcc.Upload require the set up of the Heroku simple-file-upload config or an S3 storage bucket ? If not, how does it deal with the storage of the file? Is there any other way for a user to upload data to be used in the web app?

PS I am not even sure the data file the user will upload is a static file or a dynamic one, as it will obviously be processed within the code for the analysis to happen (ie group, sort, filter, etc)

1 Answer 1

2

The Upload component from dash core components holds the data in the browser itself (as a base64 encoded string), i.e. you don't need any storage on Heroku.

Another option would be dash-uploader, which is able to handle larger files. However, this component holds the data on the server.

Sign up to request clarification or add additional context in comments.

1 Comment

The dash-uploader v. 0.5.0 actually has now option for the user to configure the handling of the HTTP POST and GET requests. In theory it could be used to pass-through the data to S3 or wherever, although I have not tested how well this kind of arrangement would work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.