[ Previous ] [ Contents ] [ Index ] [ Next ]

ns_guesstype

Overview

Lookup MIME Type

Syntax

ns_guesstype filename

Description

This function guesses and returns the MIME type of the file, based on the extension in the file name. It uses a set of default mappings and any mappings that are in the [ns/server/servername/mimetypes] section of the nsd.ini file. The default mappings are:

    .ai=application/postscript
    .aif=audio/aiff
    .aiff=audio/aiff
    .ani=application/x-navi-animation
    .au=audio/basic
    .avi=video/x-msvideo
    .bin=application/x-macbinary
    .bmp=image/bmp
    .dp=application/commonground
    .exe=application/octet-stream
    .gif=image/gif
    .gz=application/x-compressed
    .hqx=application/mac-binhex40
    .htm=text/html
    .html=text/html
    .jfif=image/jpeg
    .jpe=image/jpeg
    .jpg=image/jpeg
    .jpeg=image/jpeg
    .map=application/x-navimap
    .mov=video/quicktime
    .mpe=video/mpeg
    .mpeg=video/mpeg
    .mpg=video/mpeg
    .nvd=application/x-navidoc
    .nvm=application/x-navimap
    .pbm=image/x-portable-bitmap
    .pdf=application/pdf
    .pgm=image/x-portable-graymap
    .pic=image/pict
    .pict=image/pict
    .pnm=image/x-portable-anymap
    .ps=application/postscript
    .qt=video/quicktime
    .ras=image/x-cmu-raster
    .rgb=image/x-rgb
    .rtf=application/rtf
    .sit=application/x-stuffit
    .snd=audio/basic
    .stl=application/x-navistyle
    .tar=appliation/x-tar
    .text=text/plain
    .tgz=application/x-compressed
    .tif=image/tiff
    .tiff=image/tiff
    .txt=text/plain
    .xbm=image/x-xbitmap
    .xpm=image/x-xpixmap
    .wav=audio/x-wav
    .z=application/x-compressed
    .zip=application/x-compressed
    

See Also

Ns_ServerMimeType(), Ns_MimeIcon() (C API)

nsd.ini (Configuration file)

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1996 America Online, Inc.