Return to v2.0 docs

addFormat()


Configuration Miscellaneous Functions void controller model migrator


Adds a new MIME type to your CFWheels application for use with responding to multiple formats.

Name Type Required Default Description
extension string Yes File extension to add.
mimeType string Yes Matching MIME type to associate with the file extension.
// Add the `js` format
addFormat(extension="js", mimeType="text/javascript");
// Add the `ppt` and `pptx` formats
addFormat(extension="ppt", mimeType="application/vnd.ms-powerpoint");
addFormat(extension="pptx", mimeType="application/vnd.ms-powerpoint");

Related Functions

Miscellaneous Functions