drogon icon indicating copy to clipboard operation
drogon copied to clipboard

Support for Netpbm MIME types

Open engineerjames opened this issue 4 years ago • 2 comments

Netpbm contains the following file types: The portable pixmap format (PPM), the portable graymap format (PGM) and the portable bitmap format (PBM). I believe drogon could also be extended to support these additional media types without any adverse effects (I would be happy to implement it myself with your blessing 😄 ).

While these content types are not registered with the IANA, I have a use case for them, and would love for them to be supported natively. I know the CT_CUSTOM content enumeration also exists which I could potentially use if there is a hesitancy to support these additional media types.

Conceptually for me it would be much cleaner to rely on the content type solely (vs. additional information in the response body for example).

What do you all think?

engineerjames avatar Aug 27 '21 02:08 engineerjames

@engineerjames Thank you very much for your feedback, if you can make a PR for this, I would be very grateful.

an-tao avatar Aug 27 '21 05:08 an-tao

Thanks for your feedback. If this will be a zero-cost addition to Drogon, then I think it’s OK to have this as part of the main repository (I don’t know what would speak against it), otherwise I would welcome this as a plugin (if possible at all), because of the relative scarcity of these image formats.

Your PRs are welcome ☺️

rbugajewski avatar Aug 30 '21 08:08 rbugajewski