e57089a037
- OGG is officially an container format and is therefor classified as `application/ogg` in RFC3534. While `audio/ogg` exists, as defined in RFC5334, it doesn't have a different magic number and thus purely informative, it can only be determined by parsing the file and checking if it only contains audio data. - A quick search on Wikimedia Commons yields that the OGG container is by far more used for audio than for video, so it's safe to classify this as audio, as OGG files that only contain video would now falsy be classified as an audio file (previously it would've shown just a link to the 'View Raw' link). - Added unit tests. - Resolves https://codeberg.org/forgejo/forgejo/issues/1091 (cherry picked from commit |
||
---|---|---|
.. | ||
typesniffer.go | ||
typesniffer_test.go |