WebPolicyDelegate.AddMimeType
-----------------------------

Adds a mime type to the action list for the policy decisions.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [WebView](component_WebView.md) | [2.7](newinversion27.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |

MBS( "WebPolicyDelegate.AddMimeType"; Type; Action ) 

**MBS**( **"WebPolicyDelegate.AddMimeType";** /\* Adds a mime type to the action list for the policy decisions. \*/  
**$Type**; /\* MIME Type as text.e.g. "application/pdf" \*/   
**$Action**) /\* The action you want to be made. This can be "use" when file should be viewed, "download" if file should be downloaded and "ignore" if file should be ignored.e.g. "download" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Type | MIME Type as text. | "application/pdf" |
| Action | The action you want to be made. This can be "use" when file should be viewed, "download" if file should be downloaded and "ignore" if file should be ignored. | "download" |

### Result

Returns OK or error.

### Description

Adds a mime type to the action list for the policy decisions.  
### Examples

Makes sure all PDF files are downloaded:

 MBS ( "[WebDownloadDelegate.Install](WebDownloadDelegateInstall.md)" ; "web" )  
MBS ( "WebPolicyDelegate.AddMimeType"; "application/pdf"; "download" )  
Add a type to download:

 MBS ( "WebPolicyDelegate.AddMimeType"; "unknown/exe"; "download" )  
### See also

- [WebDownloadDelegate.Install](WebDownloadDelegateInstall.md)
- [WebPolicyDelegate.Install](WebPolicyDelegateInstall.md)
- [WebPolicyDelegate.RemoveMimeType](WebPolicyDelegateRemoveMimeType.md)

This function checks for a license.

Created 18th August 2014 , last changed 11st August 2018

  
[WebHook.SetTimeOut](WebHookSetTimeOut.md) - [WebPolicyDelegate.Install](WebPolicyDelegateInstall.md)

[HTML Version](WebPolicyDelegateAddMimeType.shtml)