Miscellaneous
addFormat()
Signature
Section titled “Signature”addFormat() — returns any
Description
Section titled “Description”Adds a new MIME format to your Wheels application for use with responding to multiple formats.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
extension | string | yes | — | File extension to add. |
mimeType | string | yes | — | Matching MIME type to associate with the file extension. |
Examples
Section titled “Examples”<!--- Add the `js` format ---> <cfset addFormat(extension="js", mimeType="text/javascript")> <!--- Add the `ppt` and `pptx` formats ---> <cfset addFormat(extension="ppt", mimeType="application/vnd.ms-powerpoint")> <cfset addFormat(extension="pptx", mimeType="application/vnd.ms-powerpoint")>