I’m trying to get the mimeType of audio files. For .amr
file, all I can get is application/octet-stream
.
I know it means apache server couldn’t guess the mimetype, because nothing seems to be related in magic.mime
file. I tried every mimeType of php and symfony, but since it’s an issue with apache server, i don’t know what to do
Any advice ?
2
Answers
Usually you can identify the file type with the first characters in the file, an arm file say #!AMR
or you can try something like this:
It sounds like you are trying to serve static files with Apache – in which case this question has got nothing to do with PHP. You just need to tell the webserver to return a mime type of audio/AMR for files with a .AMR extension.
I don’t know what you’ve tried with PHP, but it’s not hard: