1. Michael Elsdörfer
  2. django-storages

Commits

Michael Elsdörfer  committed f69e60a

Overwrite storage now works with the location defined by the user, rather than forcing MEDIA_ROOT.

  • Participants
  • Parent commits 80c9bf1
  • Branches default

Comments (0)

Files changed (1)

File django_storages/overwrite.py

View file
         Comes from http://www.djangosnippets.org/snippets/976/
         (even if it already exists in S3Storage for ages)
         """
-        # If the filename already exists, remove it as if it was a true file system
         if self.exists(name):
-            os.remove(os.path.join(settings.MEDIA_ROOT, name))
+            self.delete(name)
         return name