use right bucket for doc class
This commit is contained in:
parent
cec4bdc333
commit
76e172da0f
@ -24,9 +24,9 @@ class S3Storage(object):
|
||||
|
||||
def put(self, tracked_doc, data, content_type):
|
||||
""" upload the document to S3 """
|
||||
k = boto.s3.key.Key(self.bucket)
|
||||
aws_prefix = self._get_opt(tracked_doc['doc_class'], 'AWS_PREFIX', '')
|
||||
aws_bucket = self._get_opt(tracked_doc['doc_class'], 'AWS_BUCKET')
|
||||
k = boto.s3.key.Key(aws_bucket)
|
||||
key_name = aws_prefix + tracked_doc['_id']
|
||||
k.key = key_name
|
||||
headers = {'x-amz-acl': 'public-read',
|
||||
|
Loading…
Reference in New Issue
Block a user