Ticket #11150: imagefield_clean.patch

File imagefield_clean.patch, 631 bytes (added by Vladimir Dmitriev, 15 years ago)
  • django/forms/fields.py

     
    513513
    514514            # Since we're about to use the file again we have to reset the
    515515            # file object if possible.
    516             if hasattr(file, 'reset'):
    517                 file.reset()
     516            if hasattr(file, 'seek') and callable(file.seek):
     517                file.seek(0)
    518518
    519519            # verify() is the only method that can spot a corrupt PNG,
    520520            #  but it must be called immediately after the constructor
Back to Top