Skip to content

Commit

Permalink
feat: fs storage update uploaded property of multipart via refresh …
Browse files Browse the repository at this point in the history
…action
  • Loading branch information
smotornyuk committed Aug 29, 2024
1 parent 95c41e7 commit 51427c6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ckanext/files/storage/fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ def multipart_refresh(
data: MultipartData,
extras: dict[str, Any],
) -> MultipartData:
filepath = os.path.join(
str(self.storage.settings["path"]),
data.location,
)
data.storage_data["uploaded"] = os.path.getsize(filepath)

return data

def multipart_update(
Expand Down

0 comments on commit 51427c6

Please sign in to comment.