UNCLASSIFIED

Commit e18abee4 authored by David Freeman's avatar David Freeman
Browse files

add content-encoding when applicable

parent 5f41746e
Pipeline #99376 passed with stages
in 1 minute and 12 seconds
......@@ -28,7 +28,18 @@ def upload_file(file_name, bucket, object_name=None):
mimetype = filetype[0]
# TODO: Add signature
extra_args = {"ContentType": mimetype, "ACL": "private"}
if filetype[1] is None:
extra_args = {
"ContentType": mimetype,
"ACL": "private",
}
else:
encoding = filetype[1]
extra_args = {
"ContentType": mimetype,
"ACL": "private",
"ContentEncoding": encoding,
}
# 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