- Affected version
- v2.2.17, including the current version of xenforo.com
When I attach a file with the
A possible cause of the problem may be
.opus
extension to a post, the extension gets changed to .ogg
during the process. If I then download the .ogg
file, it still plays back as Opus. So it seems that XF automatically encapsulates Opus files in the OGG container. Why does this happen, and can it be avoided? We use Opus files as digital products, and changing their extensions is very misleading.A possible cause of the problem may be
'opus' => 'audio/ogg'
instead of 'opus' => 'audio/opus'
in the snippet below:Opus audio files can be uploaded (and rendered as an audio player) when they have a ".ogg" extension. XenForo doesn't recognize them when they have the recommended ".opus" extension (https://en.wikipedia.org/wiki/Opus_(audio_format)). This is easy to fix. 

Diff:
diff --git a/src/XF/App.php b/src/XF/App.php
index 51395a939..7cf644589 100644
--- a/src/XF/App.php
+++ b/src/XF/App.php
@@ -349,6 +349,7 @@ class App implements \ArrayAccess
return [
'mp3' => 'audio/mpeg',
'ogg' => 'audio/ogg',
+ 'opus' => 'audio/ogg'...
- Steffen
- Replies: 8
- Forum: Resolved bug reports