class documentation

MediaUpload for a chunk of bytes.

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

Method __init__ Create a new MediaInMemoryUpload.

Inherited from MediaIoBaseUpload:

Method chunksize Chunk size for resumable uploads.
Method getbytes Get bytes from the media.
Method has_stream Does the underlying upload support a streaming interface.
Method mimetype Mime type of the body.
Method resumable Whether this upload is resumable.
Method size Size of upload.
Method stream A stream interface to the data being uploaded.
Method to_json This upload type is not serializable.
Instance Variable _chunksize Undocumented
Instance Variable _fd Undocumented
Instance Variable _mimetype Undocumented
Instance Variable _resumable Undocumented
Instance Variable _size Undocumented

Inherited from MediaUpload (via MediaIoBaseUpload):

Class Method new_from_json Utility class method to instantiate a MediaUpload subclass from a JSON representation produced by to_json().
Method _to_json Utility function for creating a JSON representation of a MediaUpload.
@util.positional(2)
def __init__(self, body, mimetype='application/octet-stream', chunksize=DEFAULT_CHUNK_SIZE, resumable=False):

Create a new MediaInMemoryUpload.

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

Parameters
bodystring, Bytes of body content.
mimetypestring, Mime-type of the file or default of 'application/octet-stream'.
chunksizeint, File will be uploaded in chunks of this many bytes. Only used if resumable=True.
resumablebool, True if this is a resumable upload. False means upload in a single request.