> KASClient > KASAttachment

Class: KASAttachment

Hierarchy

KASAttachment

KASAudioAttachment

KASImageAttachment

KASVideoAttachment

Index

Properties

Methods


Properties

attachmentId

● attachmentId: string = ""


fileName

● fileName: string = ""


hasSetThumbnail

● hasSetThumbnail: boolean = false


localPath

● localPath: string = ""


requireHighResThumbnail

● requireHighResThumbnail: boolean = false


serverPath

● serverPath: string = ""


size

● size: number = 0


thumbnail

● thumbnail: string = ""


type

● type: KASAttachmentType = KASAttachmentType.Image


Methods

toJSON

toJSON(): JSON

The following string keys("ty", "afn", "asb", etc.) MUST be in sync with the Attachment object model representation in iOS and Android code. This is vital for proper serialization and deserialization over the KAS bridge.

Returns: JSON


<Static> fromJSON

fromJSON(object: any): KASAttachment

Parameters:

Name Type
object any

Returns: KASAttachment


<Static> hasLocalPath

hasLocalPath(obj: KASAttachment): boolean

Parameters:

Name Type
obj KASAttachment

Returns: boolean


<Static> hasServerPath

hasServerPath(obj: KASAttachment): boolean

Parameters:

Name Type
obj KASAttachment

Returns: boolean


<Static> populateModelFromJSON

populateModelFromJSON(attachment: KASAttachment, object: JSON): void

Parameters:

Name Type
attachment KASAttachment
object JSON

Returns: void