addAttachment

fun addAttachment(name: String, contentType: String, data: ByteArray): FormAttachment

Adds a new attachment to this AttachmentsFormElement.

Return

The new FormAttachment.

Since

200.5.0

Parameters

name

the name of the attachment

contentType

the mime type of the attachment

data

the attachment data

Throws

if data is empty