#7673: ImageField validation problem
-----------------------------+----------------------------------------------
 Reporter:  lucalenardi      |       Owner:  nobody    
   Status:  new              |   Milestone:  1.0 beta  
Component:  django.newforms  |     Version:  SVN       
 Keywords:                   |       Stage:  Unreviewed
Has_patch:  0                |  
-----------------------------+----------------------------------------------
 form.cleaned_data[image_field].read() seems to be empty when validating
 with custom validation using newforms.

 {{{
 ...
 if hasattr(data, 'temporary_file_path'):
     file = data.temporary_file_path()
 else:
     if hasattr(data, 'read'):
         file = StringIO(data.read())
     else:
         file = StringIO(data['content'])
 ...
 }}}

 data.read() in the clean() method of ImageField becomes empty after the
 first read making the file unreadable in next custom validation.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/7673>
Django Code <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to