UNCLASSIFIED

Commit 00d0dca7 authored by David Freeman's avatar David Freeman
Browse files

remove content-encoding

parent e18abee4
Pipeline #99476 passed with stages
in 1 minute and 14 seconds
......@@ -22,24 +22,18 @@ def upload_file(file_name, bucket, object_name=None):
filetype = mimetypes.guess_type(file_name)
if not filetype[0]:
if filetype[0] is None:
mimetype = "application/octet-stream"
elif filetype[1] == "gzip":
mimetype = "application/x-compressed-tar"
else:
mimetype = filetype[0]
# TODO: Add signature
if filetype[1] is None:
extra_args = {
"ContentType": mimetype,
"ACL": "private",
}
else:
encoding = filetype[1]
extra_args = {
"ContentType": mimetype,
"ACL": "private",
"ContentEncoding": encoding,
}
extra_args = {
"ContentType": mimetype,
"ACL": "private",
}
# If S3 object_name was not specified, use file_name
if object_name is None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment