Anonymous committed 85274a9

Wrapped opened file in StringIO

  • Participants
  • Parent commits d1b1e17

Comments (0)

Files changed (1)

File imagekit/

 import os
+from StringIO import StringIO
 from imagekit.lib import *
 from imagekit.utils import img_to_fobj
 from django.core.files.base import ContentFile
         # process the original image file
         fp =
-        fp = getattr(fp, 'file', fp)
+        fp = StringIO(
         self._img = self.spec.process(, self._obj)
         # save the new image to the cache
         content = ContentFile(self._get_imgfile().read())