Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix size on File object after optimizing #3

Merged
merged 1 commit into from
Apr 1, 2020
Merged

Fix size on File object after optimizing #3

merged 1 commit into from
Apr 1, 2020

Conversation

dpoirier
Copy link
Contributor

@dpoirier dpoirier commented Apr 1, 2020

Since the size attribute/property on a File object is a cached_property, we need to make sure we update it after changing the data since it might already have cached the old size.

This becomes important because Google Cloud Storage's client library refuses to upload a File object if there's not as much data as the size says there is.

Since the size attribute/property on a File object is a cached_property, we need to make sure we update it after changing the data since it might already have cached the old size.

This becomes important because Google Cloud Storage's client library refuses to upload a File object if there's not as much data as the size says there is.
Copy link
Owner

@dchukhin dchukhin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆒
Good job resolving the issue!

@dchukhin dchukhin merged commit 6463717 into dchukhin:master Apr 1, 2020
@dpoirier dpoirier deleted the size_fix branch April 1, 2020 18:50
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants