add Attachment
suspend fun addAttachment(name: String, contentType: String, filePath: String): Result<FormAttachment>
Adds a new attachment to this AttachmentsFormElement from the specified file.
Return
A Result containing the new FormAttachment. A FileNotFoundException will be set on the Result if the file at filePath does not exist.
Since
300.0.0
Parameters
name
The name of the Attachment.
content Type
The type of content.
file Path
Path to a file that will be used for the attachment's content.
Adds a new attachment to this AttachmentsFormElement.
Return
The new FormAttachment.
Since
200.5.0
Parameters
name
the name of the attachment
content Type
the mime type of the attachment
data
the attachment data
Throws
if data is empty