# MimeTypes

Namespace: **Wisej.Core**

Assembly: **Wisej.Framework** (4.0.0.0)

Maps document extensions to content MIME types.

{% tabs %}
{% tab title="C#" %}

```csharp
public class MimeTypes
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class MimeTypes
```

{% endtab %}
{% endtabs %}

## Methods

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) GetMimeType(fileName)

Returns the MIME mapping for the specified file name.

| Parameter    | Type                                                          | Description                                            |
| ------------ | ------------------------------------------------------------- | ------------------------------------------------------ |
| **fileName** | [String](https://docs.microsoft.com/dotnet/api/system.string) | The file name that is used to determine the MIME type. |

**Returns:** [String](https://docs.microsoft.com/dotnet/api/system.string).

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) IsKnownType(extension)

Returns if the file extension corresponds to a known mime type.

| Parameter     | Type                                                          | Description                  |
| ------------- | ------------------------------------------------------------- | ---------------------------- |
| **extension** | [String](https://docs.microsoft.com/dotnet/api/system.string) | The file extension to check. |

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean).

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media) SetMimeType(extension, mimeType)

Adds or changes the mime type for the specified file extension.

| Parameter     | Type                                                          | Description                                      |
| ------------- | ------------------------------------------------------------- | ------------------------------------------------ |
| **extension** | [String](https://docs.microsoft.com/dotnet/api/system.string) | The file extension to add to the mime type list. |
| **mimeType**  | [String](https://docs.microsoft.com/dotnet/api/system.string) | The mime type to add to the mime type list.      |
