Attachment

data class Attachment(val id: String, val timestamp: Long = 0, val filename: String, val state: AttachmentState = AttachmentState.QUEUED_DOWNLOAD, val localUri: String? = null, val mediaType: String? = null, val size: Long? = null, val hasSynced: Boolean = false, val metaData: String? = null)(source)

Represents an attachment with metadata and state information.

Constructors

Link copied to clipboard
constructor(id: String, timestamp: Long = 0, filename: String, state: AttachmentState = AttachmentState.QUEUED_DOWNLOAD, localUri: String? = null, mediaType: String? = null, size: Long? = null, hasSynced: Boolean = false, metaData: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Name of the attachment file, e.g., [id].jpg.

Link copied to clipboard

Indicates whether the attachment has been synced locally before.

Link copied to clipboard
val id: String

Unique identifier for the attachment.

Link copied to clipboard

Local URI pointing to the attachment file, if available.

Link copied to clipboard

Media type of the attachment, typically represented as a MIME type.

Link copied to clipboard

Additional metadata associated with the attachment.

Link copied to clipboard
val size: Long?

Size of the attachment in bytes, if available.

Link copied to clipboard

Current state of the attachment, represented as an ordinal of AttachmentState.

Link copied to clipboard

Timestamp of the last record update.