PopupAttachment

Represents an attachment belonging to a popup. Wraps the Attachment object and adds additional properties and methods to support displaying attachments in a popup.

Since

200.1.0

Properties

Link copied to clipboard
Link copied to clipboard

The MIME content type of the PopupAttachment.

Link copied to clipboard

The local temporary filepath where we store the attachment once it is loaded.

Link copied to clipboard

A value indicating whether "loading" (fetching the data) can be accomplished without using the network.

Link copied to clipboard

The name of the PopupAttachment.

Link copied to clipboard
val size: Long

The size of the PopupAttachment in bytes.

Link copied to clipboard

Inherited properties

Link copied to clipboard
open override val loadStatus: StateFlow<LoadStatus>

The load status.

Functions

Link copied to clipboard

Creates asynchronously the full image for displaying the attachment in full screen or some UI larger than a thumbnail. This is only supported if the PopupAttachment.type is PopupAttachmentType.Image.

Link copied to clipboard
suspend fun createThumbnail(width: Int, height: Int): Result<BitmapDrawable>

Creates asynchronously a thumbnail image with the specified width and height. This is only supported if the PopupAttachment.type is PopupAttachmentType.Image.

Inherited functions

Link copied to clipboard
open override fun cancelLoad()

Cancels loading metadata for the Loadable object.

Link copied to clipboard
open suspend override fun load(): Result<Unit>

Loads the metadata for the object.

Link copied to clipboard
open suspend override fun retryLoad(): Result<Unit>

Loads or retries loading metadata for the object.