Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] MP3 upload support not advertised using standard mime type #3531

Closed
graue opened this issue Nov 9, 2024 · 1 comment · Fixed by #3632
Closed

[bug] MP3 upload support not advertised using standard mime type #3531

graue opened this issue Nov 9, 2024 · 1 comment · Fixed by #3632
Labels
bug Something isn't working

Comments

@graue
Copy link

graue commented Nov 9, 2024

Describe the bug with a clear and concise description of what the bug is.

The standard mime type for MP3 files is audio/mpeg, not audio/mp3 which is deprecated. However, the instance configuration endpoint in GTS says only that audio/mp3 is supported, and does not include audio/mpeg under supported_mime_types.

This causes at least one client (Phanpy) to incorrectly report that MP3 uploads are not supported on GTS servers.

Although clients could write custom code to handle this, it's easier if GTS just advertises support for the standard mime type, audio/mpeg. (For what it's worth, Mastodon currently advertises support for both audio/mpeg and audio/mp3.)

What's your GoToSocial Version?

0.17.3+git-6f4cb2f

GoToSocial Arch

No response

What happened?

Phanpy errored, saying mp3 uploads were not supported by GTS

What you expected to happen?

The mp3 successfully uploads

How to reproduce it?

Using Phanpy, attempt to upload an mp3 file to a GTS server

Anything else we need to know?

No response

@graue graue added the bug Something isn't working label Nov 9, 2024
@tsmethurst
Copy link
Contributor

Ah thanks!

daenney added a commit that referenced this issue Dec 27, 2024
This will be either an mp1, mp2 or mp3 file. In practice it'll probably
be mp3, but this handles mp1 too for good measure. We don't advertise
audio/mp1 as a supported media type since best I can tell that was never
a MIME type that's been used.

Fixes: #3531
daenney added a commit that referenced this issue Dec 27, 2024
This will be either an mp1, mp2 or mp3 file. In practice it'll probably
be mp3, but this handles mp1 too for good measure. We don't advertise
audio/mp1 as a supported media type since best I can tell that was never
a MIME type that's been used.

This also changes the returned MIME-type for mp2 and mp3 to audio/mpeg,
to match what's expected and supported by most things nowadays.

Fixes: #3531
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants