Package googleapiclient :: Module http :: Class MediaInMemoryUpload
[hide private]
[frames] | no frames]

Class MediaInMemoryUpload

source code


MediaUpload for a chunk of bytes.

DEPRECATED: Use MediaIoBaseUpload with either io.TextIOBase or StringIO for
the stream.

Instance Methods [hide private]
 
__init__(self, body, mimetype='application/octet-stream', chunksize=DEFAULT_CHUNK_SIZE, resumable=False)
Create a new MediaInMemoryUpload.
source code

Inherited from MediaIoBaseUpload: chunksize, getbytes, has_stream, mimetype, resumable, size, stream, to_json

Inherited from MediaUpload (private): _to_json

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]

Inherited from MediaUpload: new_from_json

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, body, mimetype='application/octet-stream', chunksize=DEFAULT_CHUNK_SIZE, resumable=False)
(Constructor)

source code 
Create a new MediaInMemoryUpload.

DEPRECATED: Use MediaIoBaseUpload with either io.TextIOBase or StringIO for
the stream.

Args:
  body: string, Bytes of body content.
  mimetype: string, Mime-type of the file or default of
    'application/octet-stream'.
  chunksize: int, File will be uploaded in chunks of this many bytes. Only
    used if resumable=True.
  resumable: bool, True if this is a resumable upload. False means upload
    in a single request.
  

Decorators:
  • @util.positional(2)
Overrides: object.__init__