1. Mads Sülau Valstorp Jørgensen
  2. django-storages


Mads Sülau Valstorp Jørgensen  committed 9f9945a

Added default headers and default acl on the set_contents_from_* calls.

  • Participants
  • Parent commits 912f387
  • Branches default

Comments (0)

Files changed (1)

File backends/S3BotoStorage.py

View file
         k = self.bucket.get_key(name)
         if not k:
             k = self.bucket.new_key(name)
-        k.set_contents_from_file(content)
+        k.set_contents_from_file(content, headers=self.headers, policy=self.acl)
         return name
     def delete(self, name):
         return self.key.read(*args, **kwargs)
     def write(self, content):
-        self.key.set_contents_from_string(content)
+        self.key.set_contents_from_string(content, headers=self._storage.headers, acl=self._storage.acl)
     def close(self):