Media class
Media object returned by the select Media API
- Extends
Constructors
| Media(Media) |
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 |
| mime |
MIME type. This can be used for constructing a dataUrl, if needed. |
| name | Optional: Name of the file |
| 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. |
| size | Size of the file in KB |
Methods
| get |
Gets the media in chunks irrespecitve of size, these chunks are assembled and sent back to the webapp as file/blob |
Constructor Details
Media(Media)
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
format
mimeType
MIME type. This can be used for constructing a dataUrl, if needed.
mimeType: string
Property Value
string
name
Optional: Name of the file
name?: string
Property Value
string
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
size
Size of the file in KB
size: number
Property Value
number
Method Details
getMedia((error: SdkError, blob: Blob) => void)
Gets the media in chunks irrespecitve of size, these chunks are assembled and sent back to the webapp as file/blob
function getMedia(callback: (error: SdkError, blob: Blob) => void)
Parameters
- callback
-
(error: SdkError, blob: Blob) => void
returns blob of media
フィードバック
フィードバックの送信と表示