Attachment

constructor(authorName: String? = null, authorLink: String? = null, titleLink: String? = null, thumbUrl: String? = null, imageUrl: String? = null, assetUrl: String? = null, ogUrl: String? = null, mimeType: String? = null, fileSize: Int = 0, title: String? = null, text: String? = null, type: String? = null, image: String? = null, name: String? = null, fallback: String? = null, originalHeight: Int? = null, originalWidth: Int? = null, upload: File? = null, uploadState: Attachment.UploadState? = null, extraData: Map<String, Any> = mapOf())

Parameters

authorName

The name of the site the URL leads to.

authorLink

The link to the website.

titleLink

The link to the URL or the resource linked.

thumbUrl

The URL for the thumbnail version of the attachment, given the attachment has a visual quality, e.g. is a video, an image, a link to a website or similar.

imageUrl

The URL for the raw version of the attachment.

assetUrl

The URL for the asset.

ogUrl

The original link that was enriched.

mimeType

The mime type of the given attachment. e.g. "image/jpeg"

fileSize

The size of the given attachment.

title

The title of the attachment.

text

The page description.

type

The type of the attachment. e.g "file", "image, "audio".

image

The image attachment.

fallback

Alternative description in the case of an image attachment (img alt in HTML).

originalHeight

The original height of the attachment. Provided if the attachment is of type "image".

originalWidth

The original width of the attachment. Provided if the attachment is of type "image".

upload

The local file that will be uploaded when the attachment is sent.

uploadState

The state of the upload, i.e. the current progress of uploading the file.

extraData

Stores various extra information that can be sent when uploading the attachment or read when downloading it.