Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] dcc.Upload errors with big files #2869

Open
celia-lm opened this issue May 28, 2024 · 3 comments
Open

[BUG] dcc.Upload errors with big files #2869

celia-lm opened this issue May 28, 2024 · 3 comments
Assignees
Labels

Comments

@celia-lm
Copy link

Context

Issues

Screenshot 2024-05-28 at 10 13 32 - If I run the app with Python in a Dash Enterprise workspace, I get a callback error which is kind of weird. If you look at the callback code and the print statements in the terminal, we only get two values despite having three Inputs. The first one is probably an empty string or list, which causes the if statement to “fail” (since list_of_contents is not None), so the error we see is related to code after the if statement. The real problem is that, even if the filenames and dates get passed correctly, the content is empty > This issue has been described before in the forum: (https://community.plotly.com/t/upload-500mb-csv-but-content-is-empty/83297. Screenshot error Screenshot callback code

Additional context

  • I've tried dash-uploader (link) and it works okay but I’m concerned about (1) privacy (all files are accessible by all users by default, as opposed to session-specific storage) and (2) memory (how does saving many big files affect the app memory/performance)
  • dash-uploader is not an official component and it’s not maintained, which raises some concerns regarding production environment.

Request

  • dcc.Upload being able to handle big files (500MB, >1GB, etc).
  • If the file is not been processed correctly (list_of_contents is empty) show a more helpful error.
@CNFeffery
Copy link

@celia-lm I suggest you use other upload components with rich features, cooperate with flask or fastapi streaming file upload service to achieve more efficient file upload function:

https://fac.feffery.tech/AntdUpload
https://fac.feffery.tech/AntdDraggerUpload

@gvwilson gvwilson self-assigned this Jun 3, 2024
@Coding-with-Adam
Copy link

@CNFeffery
I see you promoting the feffery-antd-components fairly often.

Are you able to translate those docs to English?

For example, in the comment above you suggest Celia use the AntdUpload, but it's all in a different language, which will make it very hard to understand how to use.

image

@CNFeffery
Copy link

@Coding-with-Adam That would be a huge project to translate so many documents, I suggest to use some browser translate extensions in current stage(such as https://immersivetranslate.com/ or other AI-driven tools), which we often use to translate English to other language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants