We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
mimetypes.MimeTypes.add_type()
1 parent 7353106 commit d4ca183Copy full SHA for d4ca183
Doc/library/mimetypes.rst
@@ -272,3 +272,13 @@ than one MIME-type database; it provides an interface similar to the one of the
272
types, else to the list of non-standard types.
273
274
.. versionadded:: 3.2
275
+
276
277
+ .. method:: MimeTypes.add_type(type, ext, strict=True)
278
279
+ Add a mapping from the MIME type *type* to the extension *ext*. When the
280
+ extension is already known, the new type will replace the old one. When the type
281
+ is already known the extension will be added to the list of known extensions.
282
283
+ When *strict* is ``True`` (the default), the mapping will be added to the
284
+ official MIME types, otherwise to the non-standard ones.
0 commit comments