diff --git a/oyster/storage/s3.py b/oyster/storage/s3.py index 4d10790..f114b45 100644 --- a/oyster/storage/s3.py +++ b/oyster/storage/s3.py @@ -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',