File upload: keep the files that fit when a drop goes over maxFiles

Open
#3,718 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@abu-tahir-0 is already working on this.

Since Dec 2, 2026.

  • #3724 by @abu-tahir-0 — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript
Domain
frontend

Research direction

An open pull request, #3724, is already linked to this issue. Read the pull request and the file upload implementation it changes to understand the proposed option and its behavior. Check the related tests for the maxFiles case; the requested behavior is accepting files up to the limit while rejecting only overflow, with the existing default preserved.

Written by the indexing model from the issue text.

Description

🚀 Feature request

When a drop goes over maxFiles, every file in it is rejected as TOO_MANY_FILES, including the ones that would fit. Dropping 3 images on a maxFiles: 1 field accepts none.

I think this is on purpose. react-dropzone does the same. I'm asking whether an option to keep the files that fit would be welcome.

🧱 Problem statement

On a single-image field, someone drags a few photos at once. They get an error and no image. Most would expect the first one to land.

🛠️ Solution

An opt-in option that accepts files up to maxFiles and rejects only the overflow as TOO_MANY_FILES. The default stays as it is.

🧢 Your Company/Team

IQ Industries

Dominant language
TypeScript
Stars
5.3k
Forks
320
Avg merge
1d 22h
Merged PRs (30d)
60

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from chakra-ui/zag

All issues in chakra-ui/zag

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.