Tools::AudioHelper
Inherits Tools::FileHelper
Constants
ALLOWED_AUDIO_FORMATS = ["wav", "mp3"]
Allowed image content types
ALLOWED_AUDIO_MAGIC_B64 = [/^UklGR.+?QVZF/, /^SUQz/]
Base64-encoded magic bytes for allowed audio formats without padding so we can do prefix checking.
MAX_AUDIO_FILE_SIZE = (32 * 1024) * 1024
UNKNOWN_AUDIO_FORMAT = "unknown"
Instance methods
Determines the content type based on the magic bytes of the image