UNCLASSIFIED
Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Ironbank Tools
ironbank-plugins-pipeline
Commits
00d0dca7
Commit
00d0dca7
authored
Dec 10, 2020
by
David Freeman
Browse files
remove content-encoding
parent
e18abee4
Pipeline
#99476
passed with stages
in 1 minute and 14 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
13 deletions
+7
-13
stages/publish/s3_upload.py
stages/publish/s3_upload.py
+7
-13
No files found.
stages/publish/s3_upload.py
View file @
00d0dca7
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment