Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
mimetypes.MimeTypes.add_type()
1 parent 33586d6 commit d52726cCopy full SHA for d52726c
1 file changed
Doc/library/mimetypes.rst
@@ -295,3 +295,13 @@ than one MIME-type database; it provides an interface similar to the one of the
295
types, else to the list of non-standard types.
296
297
.. versionadded:: 3.2
298
+
299
300
+ .. method:: MimeTypes.add_type(type, ext, strict=True)
301
302
+ Add a mapping from the MIME type *type* to the extension *ext*. When the
303
+ extension is already known, the new type will replace the old one. When the type
304
+ is already known the extension will be added to the list of known extensions.
305
306
+ When *strict* is ``True`` (the default), the mapping will be added to the
307
+ official MIME types, otherwise to the non-standard ones.
0 commit comments