audio

Adds Attachment.Audio to the list of attachments.


fun audio(url: String)(source)

Adds Attachment.Audio with AttachmentContent.URL content from the provided URL.

Parameters

url

Audio URL

Throws

if the URL is not valid or no file in the URL was found.


fun audio(path: Path)(source)

Adds Attachment.Audio with AttachmentContent.Binary.Bytes content from the provided local file path.

Parameters

path

Path to local audio file

Throws

if the path is not valid, the file does not exist, or is not a regular file.