Skip to content

Commit

Permalink
Ensure that we're reading the file from the start (jschneier#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-bo-jangles authored and nitely committed Jul 30, 2018
1 parent 40878af commit 95346a1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions storages/backends/s3boto3.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ def _decode_name(self, name):

def _compress_content(self, content):
"""Gzip a given string content."""
content.seek(0)
zbuf = BytesIO()
zfile = GzipFile(mode='wb', compresslevel=6, fileobj=zbuf)
try:
Expand Down

0 comments on commit 95346a1

Please sign in to comment.