#21548: Add the ability to limit file extensions for ImageField and FileField -----------------------------+---------------------------------------- Reporter: timo | Owner: berkerpeksag Type: New feature | Status: assigned Component: Forms | Version: master Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -----------------------------+---------------------------------------- Changes (by berkerpeksag):
* cc: berker.peksag@… (added) * needs_better_patch: 1 => 0 * owner: jfilipe => berkerpeksag * needs_docs: 1 => 0 Comment: Pull request: https://github.com/django/django/pull/6343 Changes: * Added two validators: FileExtensionValidator and validate_image_file (this one uses FileExtensionValidator with default values from PIL.Image.EXTENSION). * Added validate_image_file to ImageField as a default validator. * Added tests for FileExtensionValidator, model and form validations. * Added documentation and release notes. I probably need to add some note for ImageField docs too. -- Ticket URL: <https://code.djangoproject.com/ticket/21548#comment:7> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/062.3b5566444862fd2b19990d71903fd075%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.