1. aneil
  2. django-storages


Daniel Greenfeld  committed ada2779

Fixed mosso storage to save the size on a content object before turning it into a cType string

  • Participants
  • Parent commits 1a955dc
  • Branches default

Comments (0)

Files changed (1)

File storages/backends/mosso.py

View file
  • Ignore whitespace
         Use the Cloud Files service to write ``content`` to a remote file
         (called ``name``).
-        content.open()
         cloud_obj = self.container.create_object(name)
-        cloud_obj.size = content.file.size
+        cloud_obj.size = content.size
+        content.open()        
         # If the content type is available, pass it in directly rather than
         # getting the cloud object to try to guess.
         if hasattr(content.file, 'content_type'):