You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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?
The text was updated successfully, but these errors were encountered: