ContentType - cWebResourceManager
Determines MIME type string based on file extension
Type: Function
Return Data Type: String
Parameters
| Parameter | Type | Description |
|---|---|---|
| sExtension | String | File extension, for example "txt" or "png" |
Syntax
Function ContentType String sExtension Returns String
Call Example
Get ContentType sExtension to StringVariable
Description
This function returns a MIME type based on the passed file extension.
It is called by when files are streamed to the client to determine the value for the `Content-Type' http header. It can be augmented to add custom extensions.