Difference between revisions of "Extending the CTP Server Content Type Associations"

From MircWiki
Jump to navigation Jump to search
Line 52: Line 52:
 
To add new file types or to override ones in the standard table, create a file called <b><tt>ContentTypes.xml</tt></b> in the CTP directory. The structure of the file is:
 
To add new file types or to override ones in the standard table, create a file called <b><tt>ContentTypes.xml</tt></b> in the CTP directory. The structure of the file is:
 
<pre>
 
<pre>
 
+
<ContentTypes>
 +
    <File
 +
        ext="extension"
 +
        type="content-type"/>
 +
    ...
 
</pre>
 
</pre>

Revision as of 15:49, 8 July 2013

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:

applicationapplication/x-ms-application
avivideo/x-msvideo
csstext/css;charset=UTF-8
csvtext/csv;charset=UTF-8
dcmapplication/dicom
deployapplication/octet-stream
docxapplication/vnd.openxmlformats-officedocument.wordprocessingml.document
dotxapplication/vnd.openxmlformats-officedocument.wordprocessingml.template
gifimage/gif
htmtext/html;charset=UTF-8
htmltext/html;charset=UTF-8
jarapplication/java-archive
jnlpapplication/x-java-jnlp-file;charset=UTF-8
jpegimage/jpeg
jpgimage/jpeg
jstext/javascript;charset=UTF-8
manifestapplication/x-ms-manifest
mdapplication/unknown
mp4video/mp4
mpegvideo/mpeg
mpgvideo/mpg
ogaaudio/oga
oggvideo/ogg
ogvvideo/ogg
pdfapplication/pdf
pngimage/png
potapplication/vnd.ms-powerpoint
potxapplication/vnd.openxmlformats-officedocument.presentationml.template
ppsapplication/vnd.ms-powerpoint
ppsxapplication/vnd.openxmlformats-officedocument.presentationml.slideshow
pptapplication/vnd.ms-powerpoint
pptxapplication/vnd.openxmlformats-officedocument.presentationml.presentation
svgimage/xvg+xml
swfapplication/x-shockwave-flash
txttext/plain;charset=UTF-8
wavaudio/wav
webmvideo/webm
wmvvideo/x-ms-wmv
xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet
xltxapplication/vnd.openxmlformats-officedocument.spreadsheetml.template
xmltext/xml;charset=UTF-8
zipapplication/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"/>
    ...