I'm trying to upload media files to a website I'm maintaining. The latest one to be added is .amr (test file from here) and it's causing problems, but only with Ubuntu. It works fine on Mac OS (High Sierra) with Firefox and Chrome. Both browsers fail to upload the file in Chrome.
For reference the JavaScript code is checking for the file types:
|3gpp|3gpp2|webm|ogg|m4a|x-m4a|amr|
In the HTML input tag, the accept value includes:
audio/ogg, audio/m4a, audio/x-m4a, audio/amr
All the other types work fine in Ubuntu. and .amr works in other operating systems. What is special about Ubuntu?
Is it describing the .amr type in a different way? If so is there a way to find out what that is so I can adjust the code to support Ubuntu?
I don't know why, but Ubuntu seems to send these files to the web browser as "audio/AMR" instead of "audio/amr" unlike other OSs.
So it was simply a case of adding that capitalisation to the acceptable values.