Subway tooter can't upload media because it won't fall back to application/octet-stream
Environment
- Installation type (OTP or From Source): Source
- Pleroma version (could be found in the "Version" tab of settings in Pleroma-FE): 0e4e2031
- Elixir version (
elixir -v
for from source installations, N/A for OTP): Erlang/OTP 25 [erts-13.0.4] [source] [64-bit] [smp:24:24] [ds:24:24:10] [async-threads:1] [jit:ns]
Elixir 1.13.4 (compiled with Erlang/OTP 25)
- Operating system: Ubuntu 22.04
- PostgreSQL version (
psql -V
): psql (PostgreSQL) 16.2 (Ubuntu 16.2-1.pgdg22.04+1)
Bug description
Due to !4081 (merged) subway tooter can no longer upload media because. In #3249 the idea was proposed to just set it to application/octet-stream
which seemed like a good idea but apparently applications like subway tooter expected image/jpeg
and if image/jpeg
isn't explicitly named you're not allowed to upload media.
Yeah, bad app design, but I feel like this is something that should be fixed because this probably won't be the last time that a tool built for mastodon won't work on pleroma because of this.
This should also plug into the Pleroma.Upload.Filter.OnlyMedia or maybe the answer is to build a more comprehensive mime upload filter and pull from there for the API endpoint.
Edited by Your New SJW Waifu