Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with multiple files when multimax option is set #360

Open
ehudmi opened this issue Nov 17, 2022 · 1 comment
Open

Problem with multiple files when multimax option is set #360

ehudmi opened this issue Nov 17, 2022 · 1 comment
Labels

Comments

@ehudmi
Copy link

ehudmi commented Nov 17, 2022

Question

I'm trying to limit the number of files uploaded on an instance of the widget.
My problem is that I can select more than the specified limit and I get a message specifying the limit....
However the selected files still get uploaded.
example: I set the limit to 3 files. I can select 5 files in the selection window and when the selection window closes the widget reports only 3 files may be selected.
When I check my project on uploadcare I see all 5 were uploaded.
What am I doing wrong?

@nd0ut
Copy link
Member

nd0ut commented Dec 23, 2022

Hey @ehudmi, this is expected behaviour. Widget uploads all files regardless of the limit, it just doesn't let the user submit if the number of files isn't fit the limit.

But you could subscribe to the new files and cancel uploading if their number doesn't fit.
Here is the example - https://codesandbox.io/embed/cancel-extra-uploads-1h0ibj?codemirror=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants