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

Png is an unknown media type in MediaTypeNames #34758

Closed
MichielDG opened this issue Apr 9, 2020 · 3 comments
Closed

Png is an unknown media type in MediaTypeNames #34758

MichielDG opened this issue Apr 9, 2020 · 3 comments
Labels
api-suggestion Early API idea and discussion, it is NOT ready for implementation area-System.Net
Milestone

Comments

@MichielDG
Copy link

In the class System.Net.Mime.MediaTypeNames.Image png does not exist.

Motivation

Png is a standaard image type that is widely used.

Existing class: https://github.com/dotnet/runtime/blob/master/src/libraries/System.Net.Mail/ref/System.Net.Mail.cs#L314-L339

Proposed Solution

public static partial class MediaTypeNames
{
    ...
    public static partial class Image
    {
        public const string Gif = "image/gif";
        public const string Jpeg = "image/jpeg";
        public const string Tiff = "image/tiff";
        public const string Png = "image/png";
    }
    ...
}
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.Net untriaged New issue has not been triaged by the area owner labels Apr 9, 2020
@ghost
Copy link

ghost commented Apr 9, 2020

Tagging @dotnet/ncl as an area owner

@ManickaP ManickaP added the api-suggestion Early API idea and discussion, it is NOT ready for implementation label Apr 9, 2020
@scalablecory
Copy link
Contributor

Duplicate of #1489

@scalablecory scalablecory marked this as a duplicate of #1489 Apr 9, 2020
@karelz
Copy link
Member

karelz commented Apr 9, 2020

Thanks for your suggestion @MichielDG -- mainly we want to prevent adding ad-hoc enum names based on anecdotal data (i.e. somebody finds it useful, or some specification uses it somewhere).
We would like to have some usage-driven approach to add the most interesting/important ones - see #1489 (comment)

If you are passionate about image type names, I'd be personally ok if we do the main issue in stages and one/first of them is focused on image mime types. Doing a brief research how much are these magical strings used e.g. on GitHub, or referenced on StackOverflow would be IMO great way to provide backing usage data for each. That will help to push this forward.

@karelz karelz added this to the 5.0.0 milestone Aug 18, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
@karelz karelz removed the untriaged New issue has not been triaged by the area owner label Oct 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-suggestion Early API idea and discussion, it is NOT ready for implementation area-System.Net
Projects
None yet
Development

No branches or pull requests

5 participants