Take the other two names for a WAV - #45
Merged
Merged
Conversation
A WAV is served as audio/wav by most tooling, as audio/vnd.wave by mail clients (RFC 2361 registered it) and as audio/x-wav by older Windows exports. Only the first was listed, so an attachment arriving as one of the other two was never offered to the handler: Nextcloud Mail filters what it shows against the viewer, and a WAV sent from Thunderbird had no player while an MP3 beside it did. The declared type does not decide what plays. The same file was served under all three names and under application/octet-stream, and Chromium and Firefox played every one of them: a media element reads the bytes. The list is what the viewer offers to open, not what a browser claims. Co-authored-by: Lucas Peters <149142920+ixgate-lpeters@users.noreply.github.com> Assisted-by: ClaudeCode:claude-opus-5 Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #45 +/- ##
=======================================
Coverage 87.99% 88.00%
=======================================
Files 36 36
Lines 2508 2510 +2
Branches 525 525
=======================================
+ Hits 2207 2209 +2
Misses 297 297
Partials 4 4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Sep 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ported from nextcloud/viewer#3387 by @ixgate-lpeters, whose diagnosis this is: Nextcloud Mail filters attachments against what the viewer will open, and a WAV sent from Thunderbird arrives as
audio/vnd.wave, so it never reached the audio handler while an MP3 beside it did.The same container goes by three names:
audio/wavin most tooling,audio/vnd.waveregistered in RFC 2361 and sent by mail clients,audio/x-wavfrom older Windows exports. Only the first was listed.The declared type does not decide what plays, which is worth stating because the list is named as though it does. Serving one WAV under each name and playing it in both engines:
audio/wavaudio/vnd.waveaudio/x-wavapplication/octet-streamcanPlayType('audio/vnd.wave')answers "no" in both, and the file plays anyway: a media element reads the bytes. So this list decides what the viewer offers to open, nothing more.Note
Files never produces these two. The server maps
wavtoaudio/wavalone, so they only arrive from callers that hand the viewer a node with a declared type of their own, which is exactly the Mail case above.The list holds other entries no engine claims,
audio/vorbisamong them, and the variable is calledbrowserSupportedMimes. That is a separate question about what the list means, raised in #46 rather than changed here.👾 This pull request was assisted by Claude Code, commits carry an
Assisted-bytrailer.