Ticket #7677: newforms_imagefix.diff

File newforms_imagefix.diff, 463 bytes (added by Florian Apolloner, 16 years ago)
  • django/newforms/fields.py

    diff --git a/django/newforms/fields.py b/django/newforms/fields.py
    index ad46d78..293791e 100644
    a b class ImageField(FileField):  
    507507            trial_image.verify()
    508508        except Exception: # Python Imaging Library doesn't recognize it as an image
    509509            raise ValidationError(self.error_messages['invalid_image'])
     510        f.seek(0)
    510511        return f
    511512
    512513url_re = re.compile(
Back to Top