Initiate a media upload
initiate_post_media_upload.RdStarts a media upload session and returns a media_id and upload_url.
After calling this function, PUT the raw binary data to upload_url, then
poll get_post_media_status() until the status is "STATUS_COMPLETED".
Use upload_media() for a convenient all-in-one wrapper.
Usage
initiate_post_media_upload(
client,
content_type,
data_size,
media_type = "TYPE_IMAGE",
description = NULL
)Arguments
- client
A
mixi2_clientobject created bymixi2_client().- content_type
MIME type of the file (e.g.
"image/jpeg").- data_size
File size in bytes.
- media_type
"TYPE_IMAGE"or"TYPE_VIDEO".- description
Optional description string.