To upload a media file as an audio it must be properly encoded as a Base64 string, as defined in RFC 4648; without whitespace, line breaks nor any other unsupported characters.

Encoding examples

The following examples read file.mp3 and print it as a valid Base64 string.

Base64 encoding methods vary between environments and programming languages.

base64 -w 0 {file.mp3}