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

FileUpload counter with multiple=False #2480

Closed
jtpio opened this issue Jul 3, 2019 · 2 comments · Fixed by #2666
Closed

FileUpload counter with multiple=False #2480

jtpio opened this issue Jul 3, 2019 · 2 comments · Fixed by #2666
Labels
resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.

Comments

@jtpio
Copy link
Member

jtpio commented Jul 3, 2019

It looks a bit odd that the FileUpload counter is increasing every time a file is uploaded, even when multiple=False is set:

fileupload-counter

When multiple=False is set shouldn't the counter equal to 1?

Can be tested with:

from ipywidgets import FileUpload, Output

out = Output()

@out.capture()
def show_content(change):
    print(change['new'].keys())

w = FileUpload(multiple=False)
w.observe(show_content, 'value')
with out:
    display(w)
out
@dadamson
Copy link

I'm also wondering about this -- even when multiple=True, the counter increments after each upload (even though the new value only contains the most recent set of uploaded files), and there doesn't seem to be a way to reset it (in a callback, for example) after processing the files.
Screenshot 2019-10-31 10 04 12

How can we reset the counter?

@JmiXIII
Copy link

JmiXIII commented Dec 17, 2019

Hello,

Facing the same issue, is there any workaround to reset the widget ?

@lock lock bot added the resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label May 20, 2020
@lock lock bot locked as resolved and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants