'ImageFieldFile' object has no attribute 'content_type' on Django 1.1

Issue #18 resolved
Former user created an issue

I just updated Django to version 1.1 and now I get this error:

Exception Type: AttributeError Exception Value: 'ImageFieldFile' object has no attribute 'content_type' Exception Location: mosso.py in _save, line 86

Comments (6)

  1. Former user Account Deleted

    Change line 86 from: cloud_obj.content_type = content.content_type To: cloud_obj.content_type = content.file.content_type

  2. Former user Account Deleted

    It works! But when I later replaced ImageFileField to ImageWithThumbsField I got a

    'cStringIO.StringI' object has no attribute 'content_type'

    Going back to "content.content_type" brings back the same old error(except with ImageWithThumbsField):

    'ImageWithThumbsField' object has no attribute 'content_type'

    Though, that is probably a flaw with django-thumbs.

  3. David Larlet repo owner

    OK, please let me know if this issue is related to storages or thumbs in this case.

  4. Adam Nelson

    This is a problem with content.content_type not existing and it's a storages issue. The patch here #5 should fix it.

  5. Log in to comment