-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
DropZone can't add same file again when remove file from state #425
Comments
Hi @jzsplk! Using your example, I'm able to re-upload a file using the native dialog that appears when the "Add image" text is clicked, as well as by dragging and dropping. Are you still experiencing this issue? |
@dpersing Hi, still experiencing this issue. You are able to re-upload cause my example has been modify by somebody. In the modified example , DropZone is closed when file uploaded. But I need to keep the DropZone so user can continue to upload with it. I have modified the example back. |
Hi @jzsplk, It looks like I'm still able to upload the same image multiple times. Do you perhaps have a different sandbox that hasn't been altered? Also, are you using the small-format Drop zone for allowing users to add multiple images? I'd recommend using one of the larger versions if users are meant to upload multiple files. |
Hi @vladucu! I'm able to repro with your example. Thanks! I'll share with the team. |
Yes, I am also facing the same issue. In my case when a file is rejected by the customValidator is uploaded again then, it's not working. |
Issue summary
Try to add a remove button to clear the files uploaded. Can not add the same file again with click Popover after I have removed it. The onDrop props is ignored.
Expected behavior
Expected I can remove a file from DropZone and I can upload it again.
When I remove the file from state outside the DropZone, the state inside the DropZone ignore the onDrop function for the same file id.
Actual behavior
Steps to reproduce the problem
it's a sample for this bug:
https://codesandbox.io/s/01nmwypl8l
Specifications
⚓️ We’re not accepting pull requests at this time
🗒 We are accepting issue reports and feature requests
🌟 Feature requests that we can’t get to right away will be closed. However, we track all requests and will use it to set priorities. See the contribution guidelines for more information.
The text was updated successfully, but these errors were encountered: