Skip to content

Instantly share code, notes, and snippets.

@CHARITH1995
Created November 2, 2021 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CHARITH1995/87a5067cc14b846720712ede4e515e05 to your computer and use it in GitHub Desktop.
Save CHARITH1995/87a5067cc14b846720712ede4e515e05 to your computer and use it in GitHub Desktop.
response = s3client.put_object(
Body=gz_body.getvalue(),
Bucket=bucket_name,
Key=s3_path,
ContentType='text/plain', # the original type
ContentEncoding='gzip', # MUST have or browsers will error
ACL='public-read'
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment