plotly / plotly/dash

setting max_size on dcc.Upload does not restrict users

Open
#2,638 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug P3 sev-3
Dominant language
Python
Stars
24.4k
Forks
2.3k
Avg merge
2d 7h
Merged PRs (30d)
13

Description

Bug

Setting max_size on the dcc.Upload component does not restrict users from selecting a file over the max_size limit.

Rather, the max_size seems to restrict the component from triggering a callback (either through filename or contents inputs). This makes it very difficult to provide user feedback on the file being too large.

Expected behavior

A file over the max_size limit should not be selectable, or should still trigger the callback, perhaps with contents = None?

Contributor guide

Open the contributing guide

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.

Research direction

Start by reproducing the dcc.Upload behavior with max_size and an oversized file, then inspect the component's upload and callback handling. Done means oversized files produce the agreed selectable or callback behavior and users can receive feedback instead of the callback being silently prevented.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.