Skip to content

MaxFiles issue  #477

Open
Open
@cannontechnology

Description

@cannontechnology

Describe the bug
Setting the following 2 props should result in replacing a single file, however it produces an error every other time. Also not crazy about the end-user experience of showing the files over the maxFile limit with errors on each. It should just replace the files up to the maxFiles size. (I have a workaround for both of these issues in the comment below).
maxFiles={1}
behaviour="replace"

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/s/dropzone-ui-complete-forked-4wempi
  2. Drop a single image multiple times. Every other drop will produce a max files error

Expected behavior
No error should happen for a single file dropped multiple times.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

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