ImageField validation depend on cStringIO
|Reported by:||Vladimir Dmitriev||Owned by:||nobody|
|Cc:||vldmit@…||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I've found that ImageField clean() method depend on reset() method of cStringIO library, and this breaks up StringIO compatibility. As a result, ValidationError is raised on uploading images on systems without cStringIO. I think it's better to use equivalent seek(0) method which is compatible with both StringIO and cStringIO.