plotly / dash

Data Apps & Dashboards for Python. No JavaScript Required.
https://plotly.com/dash
MIT License
21.16k stars 2.04k forks source link

setting max_size on dcc.Upload does not restrict users #2638

Open afultonuq opened 1 year ago

afultonuq commented 1 year ago

Bug

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

Rather, the maxsize 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?

faulty13 commented 3 months ago

Related community forum discussion: https://community.plotly.com/t/dcc-upload-max-size-exceeded-notification/