Skip to content

Commit

Permalink
Fix S3Boto3Storage access when AWS_PRELOAD_METADATA = True
Browse files Browse the repository at this point in the history
  • Loading branch information
mabuaisha authored and jschneier committed Jul 26, 2017
1 parent e88dd98 commit 4501f99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ django-storages change log

* Files uploaded with ``GoogleCloudStorage`` will now set their appropriate mimetype (`#320`_)
* Fix ``DropBoxStorage.url`` to work. (`#357`_)
* Fix ``S3Boto3Storage`` when ``AWS_PRELOAD_METADATA = True`` (`#366`_)

.. _#320: https://github.com/jschneier/django-storages/pull/320
.. _#357: https://github.com/jschneier/django-storages/pull/357
.. _#366: https://github.com/jschneier/django-storages/pull/366

1.6.3 (2017-06-23)
******************
Expand Down
2 changes: 1 addition & 1 deletion storages/backends/s3boto3.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ def size(self, name):
if self.entries:
entry = self.entries.get(name)
if entry:
return entry.content_length
return entry.size
return 0
return self.bucket.Object(self._encode_name(name)).content_length

Expand Down

0 comments on commit 4501f99

Please sign in to comment.