parent
d82dce9f38
commit
c5aa3ca4f0
2 changed files with 5 additions and 0 deletions
|
@ -444,6 +444,8 @@ class GoogleCloudStorage(_CloudStorage):
|
|||
# TODO figure out how to handle cancel_on_error=False
|
||||
key.set_contents_from_stream(fp)
|
||||
|
||||
return key.size
|
||||
|
||||
|
||||
class RadosGWStorage(_CloudStorage):
|
||||
def __init__(self, hostname, is_secure, storage_path, access_key, secret_key, bucket_name):
|
||||
|
|
|
@ -10,6 +10,9 @@ class BaseStreamFilelike(object):
|
|||
self._fileobj = fileobj
|
||||
self._cursor_position = 0
|
||||
|
||||
def close(self):
|
||||
self._fileobj.close()
|
||||
|
||||
def read(self, size=READ_UNTIL_END):
|
||||
buf = self._fileobj.read(size)
|
||||
self._cursor_position += len(buf)
|
||||
|
|
Reference in a new issue