#14787 <https://code.djangoproject.com/ticket/14787>
The ticket says to handle more errors on *FileField*. The idea it suggests is by propagating errors from uploadhandler to forms. Recently I took to solving the issue. If we look in files/uploadhandler.py <https://github.com/django/django/blob/master/django/core/files/uploadhandler.py>, there does not seems to be a proper mechanism to handle errors there or raise errors and then catch in forms. Also I feel that all particular errors for a particular thing should be together at one place. For *max_size*, I have added a diff:14787.diff <https://code.djangoproject.com/attachment/ticket/14787/14787.diff> on the ticket. What it does is add a new attribute for max_size and then in forms.FileField.to_python() <https://github.com/django/django/blob/master/django/forms/fields.py#L582>, where all checks are there, it adds another check for the same. Before trying to add checks for anything else, I had a discussion with Tim Graham on this. So what he told me is there are several third party implementations which do similar things. So there are two questions: 1.) Should we including this in core, i.e. the *max_size* attribute and corresponding check ? 2.) If not is there any other way to address the issue in the ticket? -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/9e1046eb-4b9e-411a-8b31-2b6c6bcd51fa%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.