-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
System.Net.Mime.MediaTypeNames missing types #1489
Comments
See dotnet/corefx#26201 for |
I'm currently dealing with file uploads. |
Perhaps |
Funny that |
2019 still no |
Maybe class |
I don't think you can spread a |
This issue has been marked as up-for-grabs, but we still need to wait for the API approval, is that correct? |
It's public API so strictly, yes (not sure whether dotnet/corefx#36365 got API approval). @wfurt can share how to best do that eg with a PR. |
Let me ask around @danmosemsft. The list here seems more reasonable than dotnet/corefx#36365. |
Triage: We are open to add a few of the MIME type enums. |
BTW might of interest to subscribers: dotnet/csharplang#2849 |
With problemdetails, https://tools.ietf.org/html/rfc7807, implemented in .net core please add:
|
@karelz Is there a specific format example you have in mind for this proposal? What restrictions and limitations should someone interested in making a pull request be aware of? |
PR is early. We need API proposal first, well thought through as suggested above: #1489 (comment) |
Unable to find any usage data for MIME types. However Mozilla have a list of Common MIME types. |
If it's useful as a workaround, I've implemented lots of missing MIME types in a very lightweight NuGet package (NuGet, source). (An older version is also available as an MIT-licensed gist). |
I need text/csv )) |
As long as the MIME type does not exist, you cannot increase the number of usage... Genius idea! 😂 |
Shaves down the clone/checkout to ~45 seconds.
It's also missing the csv media type name as well. |
text/json |
application/zlib-stream |
json isn't a text MIME type, it is an application type and is already in the API at text/x-json was never ratified, nor was text/javascript. |
Please add text/csv too. This issue is from 2017 |
@karelz I can agree that the audio, video, and office mime types have special uses and are not found in every application. But can we start with the file types used in the ASP.NET Core project templates, with the addition of related and some other well-known formats? I found most of the font and image formats there in the Additional sources are: IANA Media Types and ASP.NET Core FileExtensionContentTypeProvider. The ProposalApplication
Font
Image
Multipart
Text
|
The proposed list above seems quite reasonable. I can try to take it through API review @karelz. While I personally see the benefit small, the effort is also somewhat small and we get help from the community. |
@wfurt yeah, if you can bring it to Networking meeting first, let's check that we have "reasonability" agreement. Then we can push it through API review. |
Triage: The team discussed it on Thu 3/16. There was general agreement with the latest proposal - thank you @mmarinchenko! |
Will this include adding |
I was not planning to @AraHaan. Do you have example of public sites using it or is that something you applications do internally? https://www.rfc-editor.org/rfc/rfc6713 shows |
I am not sure, it might have been a random case where I noticed an |
https://github.com/dotnet/corefx/blob/3f0bd5d8c3d019ad8b1561395030a58bc38ddfe9/src/System.Net.Mail/ref/System.Net.Mime.cs#L44
I tried using
System.Net.Mime.MediaTypeNames
in my asp net core api to remove "magic strings"But it's missing quite a few MIME types.
These come to mind:
The text was updated successfully, but these errors were encountered: