s3_saver.py
def _save_s3(self, temp_file, filename, obj):
        """Saves the specified file to the configured S3 bucket."""

        conn = S3Connection(self.access_key_id, self.access_key_secret)
        bucket = conn.get_bucket(self.bucket_name)

        path = self._get_s3_path(filename)
        k = bucket.new_key(path)
        k.set_contents_from_string(temp_file.getvalue())
        k.set_acl(self.acl)

        if self.filesize_field:
            setattr(obj, self.filesize_field, k.size)

        return filename
def _save_s3(self, temp_file, filename, obj):
        conn = S3Connection(self.access_key_id, self.access_key_secret)
        bucket = conn.get_bucket(self.bucket_name)

        path = self._get_s3_path(filename)
        k = bucket.new_key(path)
        k.set_contents_from_string(temp_file.getvalue())
        k.set_acl(self.acl)

        if self.filesize_field:
            setattr(obj, self.filesize_field, k.size)

        return filename
def _save_s3 ( self , temp_file , filename , obj ) : conn = S3Connection ( self . access_key_id , self . access_key_secret ) bucket = conn . get_bucket ( self . bucket_name ) path = self . _get_s3_path ( filename ) k = bucket . new_key ( path ) k . set_contents_from_string ( temp_file . getvalue ( ) ) k . set_acl ( self . acl ) if self . filesize_field : setattr ( obj , self . filesize_field , k . size ) return filename
Saves the specified file to the configured S3 bucket.
Saves the specified file to the configured S3 bucket .