[Django] #36684: `max_size` and `min_size` validation for `FileField`

4 views
Skip to first unread message

Django

unread,
Oct 23, 2025, 4:08:38 PM10/23/25
to django-...@googlegroups.com
#36684: `max_size` and `min_size` validation for `FileField`
-------------------------------------+-------------------------------------
Reporter: amirreza | Owner: amirreza
Type: New | Status: assigned
feature |
Component: Forms | Version: dev
Severity: Normal | Keywords: form FileFIeld
Triage Stage: | files
Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
hi
as disccussed in [https://forum.djangoproject.com/t/proposal-max-and-min-
size-validation-for-filefield/43232 forum], i think a `max_size` and
`min_size` validation could be a good addition to django
or at least `max_size`

should mention i can do this one myself

i'm fine by doing it as a paarameter in `FormField`, or as a validator
function
so if you have a preference, please do tell

should mention anything discussed here also applies to `ImageField` and
anything else inheriting from `FormField`
--
Ticket URL: <https://code.djangoproject.com/ticket/36684>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 23, 2025, 6:13:17 PM10/23/25
to django-...@googlegroups.com
#36684: `max_size` and `min_size` validation for `FileField`
-------------------------------------+-------------------------------------
Reporter: amirreza | Owner: amirreza
Type: New feature | Status: closed
Component: Forms | Version: dev
Severity: Normal | Resolution: duplicate
Keywords: form FileFIeld | Triage Stage:
files | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Antoliny):

* resolution: => duplicate
* status: assigned => closed

Comment:

[https://code.djangoproject.com/ticket/36685 Duplicate ticket36685]
--
Ticket URL: <https://code.djangoproject.com/ticket/36684#comment:1>
Reply all
Reply to author
Forward
0 new messages