From 5e250ce41d0ae9f9c989a25ab3a73bc70215d3db Mon Sep 17 00:00:00 2001 From: mabuaisha Date: Tue, 25 Jul 2017 18:24:17 +0300 Subject: [PATCH] Update S3Boto3Storage class by updating size method to read the file size using size attr instead of content_lenght Update S3Boto3Storage class by updating size method to read the file size using size attr instead of content_lenght --- storages/__init__.py | 2 +- storages/backends/s3boto3.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/storages/__init__.py b/storages/__init__.py index 4574cc897..d07785c52 100644 --- a/storages/__init__.py +++ b/storages/__init__.py @@ -1 +1 @@ -__version__ = '1.6.3' +__version__ = '1.6.4' diff --git a/storages/backends/s3boto3.py b/storages/backends/s3boto3.py index 741bf3333..97cd6294d 100644 --- a/storages/backends/s3boto3.py +++ b/storages/backends/s3boto3.py @@ -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