Skip to content

Commit

Permalink
Fix issue with get_file_size and S3 (#460)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidMStraub authored Dec 1, 2023
1 parent 72639a4 commit ad17934
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gramps_webapi/api/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ def file_exists(self) -> bool:

def get_file_size(self) -> int:
"""Return the file size in bytes."""
self.client.head_object(Bucket=self.bucket_name, Key=self.object_name)
response = self.client.head_object(Bucket=self.bucket_name, Key=key)
response = self.client.head_object(
Bucket=self.bucket_name, Key=self.object_name
)
file_size = response["ContentLength"]
return file_size

Expand Down

0 comments on commit ad17934

Please sign in to comment.