Commits

Justin Driscoll committed 3152e2c

Added 'replace' argument to save_image

Comments (0)

Files changed (1)

imagekit/models.py

                 prop = getattr(self, spec.name())
                 prop._create()
                 
-    def save_image(self, name, image, save=True):
-        if self._imgfield:
+    def save_image(self, name, image, save=True, replace=True):
+        if self._imgfield and replace:
             self._imgfield.delete(save=False)
         if hasattr(image, 'read'):
             data = image.read()