Merge "Fix a bug in s3 log uploader with .gz files"
This commit is contained in:
commit
3eb75563fe
@ -169,10 +169,11 @@ class Uploader():
|
|||||||
content_encoding = file_detail.encoding
|
content_encoding = file_detail.encoding
|
||||||
data = open(file_detail.full_path, 'rb')
|
data = open(file_detail.full_path, 'rb')
|
||||||
|
|
||||||
extra_args = dict(
|
extra_args = {}
|
||||||
ContentType=file_detail.mimetype,
|
if file_detail.mimetype:
|
||||||
ContentEncoding=content_encoding
|
extra_args['ContentType'] = file_detail.mimetype
|
||||||
)
|
if content_encoding:
|
||||||
|
extra_args['ContentEncoding'] = content_encoding
|
||||||
if self.public:
|
if self.public:
|
||||||
extra_args['ACL'] = 'public-read'
|
extra_args['ACL'] = 'public-read'
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user