-
Notifications
You must be signed in to change notification settings - Fork 252
Description
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?