GetMediaType method (WinStudio scripts)

Applies to

Document (file) operations

Description

Takes a file extension as an argument and returns the media type associated with that file extension. For example, the file extension "jpg" returns the media type "image/jpeg".

Syntax

GetMediaType( string extension, out string errorMessage )

where:

  • extension is the file extension.
  • errorMessage is the error message to be returned if the file extension is not found.