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

Why 'audio/flac' hasn't been added to _mimes? #235

Closed
lazka opened this issue Oct 21, 2015 · 4 comments
Closed

Why 'audio/flac' hasn't been added to _mimes? #235

lazka opened this issue Oct 21, 2015 · 4 comments

Comments

@lazka
Copy link
Member

lazka commented Oct 21, 2015

Originally reported by: potar (Bitbucket: potar, GitHub: potar)


The reason might be that this MIME type is a native encapsulation format, details https://wiki.xiph.org/Talk:MIME_Types_and_File_Extensions#.flac_-_application.2Fflac

But you've already done the similar thing for ogg MIME types:
https://bitbucket.org/lazka/mutagen/src/90787db5195a5ef9c2e27b92d78ed94fb1fbb186/mutagen/ogg.py?at=default&fileviewer=file-view-default#ogg.py-492

Wouldn't it be a consistent to add 'audio/flac' here https://bitbucket.org/lazka/mutagen/src/90787db5195a5ef9c2e27b92d78ed94fb1fbb186/mutagen/flac.py?at=default&fileviewer=file-view-default#flac.py-657 ?


@lazka
Copy link
Member Author

lazka commented Oct 21, 2015

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


Sure. 74b2f4fa6ff28bca4e3a7f6b65ba

Do you have a use case for the provided mime types?

@lazka
Copy link
Member Author

lazka commented Oct 21, 2015

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


flac: add audio/flac mime type. Fixes #235

@lazka
Copy link
Member Author

lazka commented Oct 22, 2015

Original comment by potar (Bitbucket: potar, GitHub: potar):


Basically, I wanted to add audio/flac MIME type because some browsers set it as a content-type when send a file to a server side. And, for example, if you want to validate the file on the server side and make sure that the file has flac mime type, you can't do that by simply using mutagen since that mime type wasn't included into the _mimes list.
But thanks to you it's possible now.

@lazka
Copy link
Member Author

lazka commented Oct 22, 2015

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


OK, thanks.

@lazka lazka closed this as completed Apr 7, 2016
lazka added a commit that referenced this issue Apr 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant