You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Client:
Google Chrome 102.0.4975.0 (Official Build) dev (64-bit)
Revision 9637db21d4426d633aafd3a8117272c5b37bc672-refs/branch-heads/4975
Platform 14658.0.0 (Official Build) dev-channel edgar
Firmware Version Google_Edgar.7287.167.156
The text was updated successfully, but these errors were encountered:
However when using kt-paperclip to do the identification (I hacked together a basic script to invoke the Gem to do it, so it's not Mastodon code doing any part of the processing) it shows a different result based on the file names, both of which differ from audio/ogg
vmstan@Sovereign ~/Code/mime-type $ ruby get_mime_type.rb ~/Downloads/youre-a-girl.ogg
The MIME type of the file is: audio/vorbis
vmstan@Sovereign ~/Code/mime-type $ ruby get_mime_type.rb ~/Downloads/youre-a-girl.opus
The MIME type of the file is: audio/opus
In the Mastodon file app/models/concerns/attachmentable.rb there is a specific bypass for audio/vorbis files to bypass the kt-paperclip identification method and use file. I suspect it's necessary to add an exemption for audio/opus -- I will test and report back.
Steps to reproduce the problem
Expected behaviour
both files should be accepted
Actual behaviour
uploading the file with the .opus extension results in a pop-up that says "422 Validation failed: File content type is invalid, File is invalid"
Specifications
Server:
https://github.com/mastodon/mastodon/tree/2287eebae0c1d699436a8cf3218d7cfe990a3605
Client:
Google Chrome 102.0.4975.0 (Official Build) dev (64-bit)
Revision 9637db21d4426d633aafd3a8117272c5b37bc672-refs/branch-heads/4975
Platform 14658.0.0 (Official Build) dev-channel edgar
Firmware Version Google_Edgar.7287.167.156
The text was updated successfully, but these errors were encountered: