Bytes

class Bytes(content: ByteArray, val fileName: String? = null) : TemplateSource.Content

Content already held in memory.

Constructors

Link copied to clipboard
constructor(content: ByteArray, fileName: String? = null)

Properties

Link copied to clipboard
open override val fileName: String?

File name sent with the upload, when known.

Functions

Link copied to clipboard
open suspend override 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.

Link copied to clipboard
open override fun toString(): String