Commits

Guilherme Gondim committed f2a75c8

fix EXIF property to use default storage instead directly from file system

  • Participants
  • Parent commits 7783592

Comments (0)

Files changed (1)

File galeria/models.py

 
 from django.db import models
 from django.conf import settings
+from django.core.files.storage import default_storage
 from django.utils.translation import ugettext_lazy as _
 
 from imagekit.models import ImageSpec
 
     @property
     def EXIF(self):
-        image_file = open(self.original_image.path, 'rb')
+        image_file = default_storage.open(self.original_image.path, 'rb')
         try:
             return EXIF.process_file(image_file)
         except Exception, e: