Skip to content

Conversation

@linar-jether
Copy link
Contributor

When uploading file-like objects without a specified size, upload in chunks instead of exhausting the stream and keeping the data in-memory.

See #1909

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.
@googlebot googlebot added the cla: no This human has *not* signed the Contributor License Agreement. label Jun 27, 2016
@linar-jether
Copy link
Contributor Author

Signed it

@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Jun 27, 2016
@tseaver tseaver added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. api: storage Issues related to the Cloud Storage API. labels Jun 27, 2016
self._buffered_data = self._stream.read(size)
self._buffered_data = self._stream.read(size) \
if not hasattr(self._stream,
'closed') or not self._stream.closed else ''

This comment was marked as spam.

@linar-jether
Copy link
Contributor Author

fixed according to comments

@tseaver
Copy link
Contributor

tseaver commented Jul 12, 2016

@linar-jether thanks for the changes. The pylint failures on Travis aren't due to this PR: they released a new version last Friday, which introduced new checks that we now fail. The master branch now has fixes for those failures: could you rebase your branch against it and re-push?

@linar-jether
Copy link
Contributor Author

All tests passed

import copy
import hashlib
from io import BytesIO
from io import BytesIO, UnsupportedOperation

This comment was marked as spam.

@daspecster
Copy link
Contributor

@linar-jether, cool! Do you think you could squash these commits down?
Also, I noticed the imports issue.

Otherwise LGTM, but I defer to @tseaver/@dhermes for confirmation.

@linar-jether linar-jether force-pushed the master branch 2 times, most recently from 742a95e to 43464b7 Compare July 14, 2016 08:29
@linar-jether
Copy link
Contributor Author

Sure, squashed all previous commits and separated the imports

@tseaver tseaver merged commit bd6435a into googleapis:master Jul 14, 2016
@tseaver
Copy link
Contributor

tseaver commented Jul 14, 2016

@linar-jether Thanks again for your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API. cla: yes This human has signed the Contributor License Agreement. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

4 participants