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

onDrop does not return all the files dropped #369

Open
sharmavipul92 opened this issue Oct 11, 2024 · 0 comments
Open

onDrop does not return all the files dropped #369

sharmavipul92 opened this issue Oct 11, 2024 · 0 comments

Comments

@sharmavipul92
Copy link

The documentation says that the onDrop function returns all the files which are dropped. But it only returns the valid files which are dropped.

I am facing issues when I drop a valid and an invalid file (based on file size limit and accepted mime type). Since the onDropRejected function runs first, it shows the alert, for eg., file size is greater than 5mb. But then the onAdd function runs and I have to check and clear the previous alerts, if any (because if someone drops only a valid file, i need to clear previous alerts). This also clears the valid file size alert which was there. How do I overcome this problem?

One way i can think of is a common function which gets all the files dropped, or a pre-event hook which can be called. Any thoughts on this?

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

No branches or pull requests

1 participant