forked from dropzone/dropzone
-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Describe the bug
Incorrectly applied maxFiles restriction with previously loaded files. Currently takes into account only new loaded files.
To Reproduce
Steps to reproduce the behavior:
- Say maxFiles = 2
- Loaded N files from the server, showing with displayExistingFile()
- Adding new files...
- "maxfilesreached" fired only when we add 2 new files.
- Now we have N + 2 files.
- Save form, reload page, add 2 more files, etc.
Expected behavior
The restriction must take into account previously loaded files, not allowing to exceed the limit.
There is a controversial issue, when we have more files on the server than the maxFiles (e.g. we have lowered the limit after the previous uploads). We can show them as valid files or just apply a visual '.dz-error' effect to those, which exceed the limit, and obviously not allowing adding new files.
Will dig into the code a bit later.
NicolasCARPi
Metadata
Metadata
Assignees
Labels
No labels