mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Fixed #11150 -- Removed dependency on cStringIO in ImageField validation. Thanks vvd for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17825 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -577,8 +577,8 @@ class ImageField(FileField):
|
||||
|
||||
# Since we're about to use the file again we have to reset the
|
||||
# file object if possible.
|
||||
if hasattr(file, 'reset'):
|
||||
file.reset()
|
||||
if hasattr(file, 'seek') and callable(file.seek):
|
||||
file.seek(0)
|
||||
|
||||
# verify() is the only method that can spot a corrupt PNG,
|
||||
# but it must be called immediately after the constructor
|
||||
|
||||
Reference in New Issue
Block a user