Skip to content
Browse files

Fixed #7673: make sure to rewind uploaded image data when validating …

…ImageFields. Thanks, Mike Axiak.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 5f73e2c commit e63f8bf65571d07c02725a4c86036be11e949916 @jacobian jacobian committed
Showing with 2 additions and 0 deletions.
  1. +2 −0 django/newforms/
2 django/newforms/
@@ -507,6 +507,8 @@ def clean(self, data, initial=None):
except Exception: # Python Imaging Library doesn't recognize it as an image
raise ValidationError(self.error_messages['invalid_image'])
+ if hasattr(f, 'seek') and callable(
return f
url_re = re.compile(

0 comments on commit e63f8bf

Please sign in to comment.
Something went wrong with that request. Please try again.