MIME Mapping

An important part of web serving is providing a useful "MIME" (Multipurpose Internet Mail Extensions) type with the file or page being served. MIME types describe a file's content to Web Browsers. Since MIME types are not part of a MacOS file's basic information, you need to map an association between file type (name extension) and MIME type.

TeleFinder's default mapping is provided in the file "www_mimes.config." This is a TeleFinder tab delimited configuration file, similar in structure to many other TeleFinder configuration files. Alternatively, TeleFinder can obtain MIME types from the Internet Config extension.

 

Built-in MIME Mappings

The following MIME mappings are loaded into TeleFinder's Web Server from the tab delimited "www_mimes.config" file.
 

File Extension

MIME Type

.SPM

text/html

.SPML

text/html

.HTM

text/html

.HTML

text/html

.GIF

image/gif

.JPG

image/jpeg

.JPEG

image/jpeg

.TXT

text/plain

.LOG

text/plain

.DCR

application/x-director

.PDF

application/pdf

.HQX

application/mac-binhex40

.WAV

audio/x-wav

.CLASS

application/octet-stream

.CLS

application/octet-stream

.PICT

image/x-macpict

.MOOV

video/quicktime

.MOV

video/quicktime

any other file

application/binary

   
If your web site contains files that need a MIME mapping that is not listed here, you'll either need to edit "www_mimes.config" directly using a text editor, or let Internet Config be the source of MIME types.

 

Editing the www_mimes.config File

The www_mimes.config file is a tab delimited text file that you can modify with just about any text editor including "Simple Text" or BBEdit. The www_mimes.config should be located in the server "config" folder at the same level as the TeleFinder application.

Each record in the file must have the following structure.

record type<tab>file-extension<tab>mime-type<tab>Macintosh Type Code<return>

 

  • The record type for this file is 'mmap'. Enter this without the single quotes. It must be lowercase.
  • Each record, inlcuding the last, needs to have a return at the end of the line.
  • The final "<tab>Macintosh Type Code" is optional. This is the 4 character Finder code.

A finished record should look like this.

mmap	.GIF	image/gif	GIFf

 

 


Using Internet Config

If Internet Config is not installed, you'll need to install the Internet Config extension. After installing Internet Config, open the Internet Config application.

Remove "www_mimes.config" from TeleFinder's config folder then restart the TeleFinder Server. fter you install Internet Config. When Internet Config is installed, it becomes TeleFinder's primary source for MIME mappings.

If a file is not mapped by Internet Config, TeleFinder uses its internal mapping information.

 

Installing a new MIME Type with Internet Config

Open the Internet Config application. First click in the File Mapping's Add button.

      
      
Internet Config will open the "File Mappings" dialog, click in its "Add" button to open the "Mapping Entry " dialog. Then enter the following information to add the Acrobat Portable Document Format to the File Mappings.
Extension: .pdf

MIME Type: application/pdf


      
      
Internet Config's Mapping Entry dialog contains extra information that TeleFinder does not use, but it may be used by other applications. TeleFinder uses the "Extension" and "MIME Type" fields only. You can leave all the other fields blank, or at their default setting.

Please refer to the Internet Config documentation for additional information about the program.