Commits

Simone Marzola committed be337f7

use the s3_key as a file-like object when retrieve stored attachments, avoid to store them in memory

Comments (0)

Files changed (1)

tgext/datahelpers/remote_attachments.py

     @cached_property
     def file(self):
         if isinstance(self._file, basestring):
-            self._file = self.s3_key.get_file(self._file)
-            self._file.seek(0)
+            self._file = self.s3_key
         return self._file
 
     @cached_property