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

Update MimeTypes database (eg. *.msg is missing) #880

Closed
BeJoNe opened this issue Jan 26, 2023 · 0 comments
Closed

Update MimeTypes database (eg. *.msg is missing) #880

BeJoNe opened this issue Jan 26, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@BeJoNe
Copy link

BeJoNe commented Jan 26, 2023

I was thankfully using your wonderful library but got stuck on getting the mimetype for an outlook "message.msg" file..

So, for the mapping-part of "file-extensions to mimetypes" I added
https://www.nuget.org/packages/MimeMapping
to my project:

The Dictionary is generated from the https://github.com/jshttp/mime-db#mime-db
Works similar to .NET's https://learn.microsoft.com/dotnet/api/system.web.mimemapping.getmimemapping).

It aggregates data from the following sources:
https://www.iana.org/assignments/media-types/media-types.xhtml
https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
https://hg.nginx.org/nginx/raw-file/default/conf/mime.types
The library is just a literal C# Dictionary<string, string> with over 1000 entries, and a helper method that can be passed a file path.

Is there a chance using this class in your library (and save your time) ?
https://github.com/visualon/MimeMapping/blob/main/KnownMimeTypes.cs

@jstedfast jstedfast added the enhancement New feature or request label Jan 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants