Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 9.5   10.0   10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2    Statistic    FMM    Blog  

WebPolicyDelegate.AddMimeType

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

Component Version macOS Windows Linux Server iOS SDK
WebView 2.7 ✅ Yes ❌ No ❌ No ❌ No ❌ No
MBS( "WebPolicyDelegate.AddMimeType"; type; action )   More

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" ; "web" )
MBS( "WebPolicyDelegate.AddMimeType"; "application/pdf"; "download" )

Add a type to download:

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

See also

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


WebDownloadDelegate.textEncodingName - WebPolicyDelegate.Install

Feedback: Report problem or ask question.