次の方法で共有


Media class

Media object returned by the select Media API

Extends

Constructors

Media(Media)

Properties

preview

A preview of the file which is a lightweight representation. In case of images this will be a thumbnail/compressed image in base64 encoding.

Inherited Properties

content

Content of the file. When format is Base64, this is the base64 content When format is ID, this is id mapping to the URI When format is base64 and app needs to use this directly in HTML tags, it should convert this to dataUrl.

format

Format of the content

mimeType

MIME type. This can be used for constructing a dataUrl, if needed.

name

Optional: Name of the file

size

Size of the file in KB

Methods

getMedia(getMediaCallbackFunctionType)

Gets the media in chunks irrespective of size, these chunks are assembled and sent back to the webapp as file/blob

See SdkError if there is an error If error is null or undefined, the callback will be called with See Blob.

Constructor Details

Media(Media)

new Media(that?: Media)

Parameters

that
Media

Property Details

preview

A preview of the file which is a lightweight representation. In case of images this will be a thumbnail/compressed image in base64 encoding.

preview: string

Property Value

string

Inherited Property Details

content

Content of the file. When format is Base64, this is the base64 content When format is ID, this is id mapping to the URI When format is base64 and app needs to use this directly in HTML tags, it should convert this to dataUrl.

content: string

Property Value

string

Inherited From File.content

format

Format of the content

format: FileFormat

Property Value

Inherited From File.format

mimeType

MIME type. This can be used for constructing a dataUrl, if needed.

mimeType: string

Property Value

string

Inherited From File.mimeType

name

Optional: Name of the file

name?: string

Property Value

string

Inherited From File.name

size

Size of the file in KB

size: number

Property Value

number

Inherited From File.size

Method Details

getMedia(getMediaCallbackFunctionType)

Gets the media in chunks irrespective of size, these chunks are assembled and sent back to the webapp as file/blob

See SdkError if there is an error If error is null or undefined, the callback will be called with See Blob.

function getMedia(callback: getMediaCallbackFunctionType)

Parameters

callback
getMediaCallbackFunctionType

callback is called with the