Skip to content

onDropRejected not called when file is rejected #972

@milosdavidovic

Description

@milosdavidovic

Hi,

  • I found a bug
  • I want to propose a feature

Use-case description:
I am not using drag and drop feature (yet), but simple input which takes file from native file picker. I track added files manually using components state.
Repro steps:
User adds one file
User removes that file (removed from component state only)
User tries to add same file again
File is not accepted (already exists inside useDropzone's state probably)
onDropRejected is not called so no way of re-adding this file to component state

Sandbox example:
https://codesandbox.io/s/trusting-bhaskara-xev2w

Note: I was thinking that onDropRejected should be called in this case because it is called when user tries to add file with size > that maxsize. Then file is rejected and we can handle this with onDropRejected callback. I guess this is similar thing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions