Content

sealed interface Content : TemplateSource

A template whose bytes are available locally. Its SHA-256 is the legacy Carbone template id.

Inheritors

Properties

Link copied to clipboard
abstract val fileName: String?

File name sent with the upload, when known.

Functions

Link copied to clipboard
abstract suspend fun bytes(): ByteArray

Reads the content. Implementations read once and cache the result.

Link copied to clipboard
open suspend fun sha256(): TemplateId

Legacy template id: SHA-256 of the content, hex encoded.