IDocumentMIMETypes

class IDocumentMIMETypes

Bases: ImpactCOMWrapperBase, Iterable

Description:

A collection of IDocumentMIMEType objects.

Remarks:

MIME types are also known as Internet media types and indicate the type of data that files contain. The official register of MIME types is available online at https://www.iana.org/assignments/media-types/media-types.xhtml. A default document MIME type can be configured with a MIME property of ‘*’. The default document MIME type is used when files cannot be matched against any other MIME type. It is recommended you Refresh the collection before performing operations such as adding or deleting items. Introduced in Impact 9.0.0.83.

Wraps a COM object or another wrapper instance. Accepts: - A valid impact_object - An existing impact_com_wrapper_base-derived instance

property count

Gets Count.

Description:

The number of items in this collection.

Returns:

The value of Count.

Return type:

count (int)

property supports_translations

Gets supports_translations.

Description:

Determines if the IDocumentMIMETypes support translation.

Returns:

The value of supports_translations.

Return type:

supports_translations (bool)

add(m_i_m_e, name)
Description:

Adds a new document MIME type.

Remarks:

The MIME must uniquely identify each IDocumentMIMEType. The MIME is also known as the Internet media type and indicates the type of data that a file contains. The official register of MIME types is available online at https://www.iana.org/assignments/media-types/media-types.xhtml.

Parameters:
  • mime (str) – The unique MIME identifier.

  • name (str) – The name of the MIME type.

find_mime_type_for_extension(extension)
Description:

Locates an IDocumentMIMEType object for a specified file path extension.

Remarks:

The Extension can optionally include the period character and is case-insensitive.

Parameters:

extension (str) – The file extension to locate the associated IDocumentMIMEType for.

find_type_for_extension(extension)
Description:

Locates an IDocumentType object for a specified file path extension.

Remarks:

The Extension can optionally include the period character and is case-insensitive.

Parameters:

extension (str) – The file extension to locate the associated IDocumentType for.

Examples:

item(index)
Description:

Gets an IDocumentMIMEType object with the specified MIME or index.

Parameters:

index (any) – Specifies the index of the IDocumentMIMEType object to get.

refresh()
Description:

Refresh the collection of IDocumentMIMETypes directly from the document provider.

Examples