Skip to content

onDrop does not return all the files dropped #369

@sharmavipul92

Description

@sharmavipul92

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions