question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] dcc.Upload does not support re-upload the same file.

See original GitHub issue

It appears that if one uses the dcc.Upload.contents property for triggering callback, it fails when the user tries to upload the same file again, due to the content is the same.

I would imagine that a property similar to n_clicks should be provided to trigger callback on each upload event.

Versions:

dash                      1.12.0
dash-core-components      1.10.0
dash-html-components      1.0.3
dash-renderer             1.4.1

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
alexcjohnsoncommented, Jan 17, 2022

@noxthot I’m not really sure why the contributor of #859 closed that PR, it does seem like that solution would work though requiring users to add an extra input upload_timestamp to their callbacks just to cover this edge case is a little awkward, I’d rather we try and find a solution that doesn’t require that. Regardless, at this point the PR would need to be recreated in the main dash repo as the dash-core-components repo is no longer used.

0reactions
JonThomcommented, Feb 8, 2022

In the meantime, a workaround is to simply use a callback to replace the upload component after reading its contents.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reuploading same file - Dash Python - Plotly Community Forum
Basically I want to populate a database with files using the contents from dcc.Upload as an input. However, if the user wants to...
Read more >
Problem dropping same file twice in a row - Stack Overflow
I found a solution which is just reset the contents and filename to None in the Output of the callback. Save this answer....
Read more >
The Upload Component - Plotly Dash - YouTube
Build an app that allows users to view their own data, by using the Dash Upload component. We will also give users the...
Read more >
FAQ - Conductor Documentation
If the package isn't listed in supported software page we don't currently ... it won't be re-uploaded as our system will reckognize it...
Read more >
Worldline Batch (Basic) - Ingenico ePayments Support
If you don't launch the process within an hour, the status changes to “Expired”. In this case, you need to re-upload the files...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found