Extending the CTP Server Content Type Associations
Jump to navigation
Jump to search
The embedded server in CTP has a built-in table that associates file extensions with Content-Types. This article describes how to extend the table without having to rebuild the server. This article is intended for administrators who discover that they need to serve non-standard file types.
The standard file types and their associated Content-Types are:
application | application/x-ms-application |
avi | video/x-msvideo |
css | text/css;charset=UTF-8 |
csv | text/csv;charset=UTF-8 |
dcm | application/dicom |
deploy | application/octet-stream |
docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document |
dotx | application/vnd.openxmlformats-officedocument.wordprocessingml.template |
gif | image/gif |
htm | text/html;charset=UTF-8 |
html | text/html;charset=UTF-8 |
jar | application/java-archive |
jnlp | application/x-java-jnlp-file;charset=UTF-8 |
jpeg | image/jpeg |
jpg | image/jpeg |
js | text/javascript;charset=UTF-8 |
manifest | application/x-ms-manifest |
md | application/unknown |
mp4 | video/mp4 |
mpeg | video/mpeg |
mpg | video/mpg |
oga | audio/oga |
ogg | video/ogg |
ogv | video/ogg |
application/pdf | |
png | image/png |
pot | application/vnd.ms-powerpoint |
potx | application/vnd.openxmlformats-officedocument.presentationml.template |
pps | application/vnd.ms-powerpoint |
ppsx | application/vnd.openxmlformats-officedocument.presentationml.slideshow |
ppt | application/vnd.ms-powerpoint |
pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation |
svg | image/xvg+xml |
swf | application/x-shockwave-flash |
txt | text/plain;charset=UTF-8 |
wav | audio/wav |
webm | video/webm |
wmv | video/x-ms-wmv |
xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
xltx | application/vnd.openxmlformats-officedocument.spreadsheetml.template |
xml | text/xml;charset=UTF-8 |
zip | application/zip |
To add new file types or to override ones in the standard table, create a file called ContentTypes.xml in the CTP directory. The structure of the file is:
<ContentTypes> <File ext="extension" type="content-type"/> ...