Home

 

Configure MIME types

You can assign Multipurpose Internet Mail Extensions (MIME) types to file extensions, and assign icons to MIME types. This applies to files attachments uploaded to wiki pages.

You can configure Wikis to assign a specific MIME type to files with specific extensions. Wikis with MIME types tell operating systems what applications to open them with, and what applications to display in file open windows. MIME types make it easier for users at a glance to know what type of data a file contains. Also, some applications do not download files that do not have a MIME type that they support.

This configuration applies to files attached to Wikis pages through the Web user interface. The configuration is ignored if a third party application assigns MIME types to extensions using the API. See the topic Wikis API for information about how to assign MIME types through the API.

Optionally, you can also configure Wikis to assign IBM Lotus Connections icons to specific MIME types. The icons are provided with Lotus Connections. See the topic File type icons.

To configure MIME types...

  1. Start wsadmin. See the topic Starting wsadmin.

  2. Access the Wikis configuration files...

  3. Network deployment:

    If you are asked to select a server, you can select any server.

  4. Check out the Wikis configuration files...

    WikisConfigService.checkOutConfig("<working_directory>", "cell_name")

    where:

    • <working_directory> is the temporary working directory to which the configuration XML and XSD files are copied. The files are kept in this working while you change them.

    • cell_name is the name of the IBM WebSphere Application Server cell hosting the Lotus Connections feature. This argument is required even in stand-alone deployments. If you do not know the cell name, do one of the following to determine it:

      • Stand-alone deployment: Look at the name after the following in the file system:

          WAS_HOME\profiles\profile_name\config\cells\
          

    • Network deployment: From wsadmin...

        print AdminControl.getCell()
        

    For example:

      WikisConfigService.checkOutConfig("/opt/my_temp_dir", "CommServerNode01Cell")
      

  5. Navigate to the working specified in step 3 and open the mime-wikis-config.xml file. The contents look like this:

      <mapping mimeType="..." mediaType="..."> 
      		<extension></extension> 
      		<extension></extension> 
      		.... 
      </mapping>
      

  6. In the mimeType attribute specify a mime type in standard format, for example text/plain. Each value must be unique compared with other mimeType values in other mapping elements, or an error is returned when you start the system. See the Internet Assigned Numbers Authority (IANA) Web site for a list of MIME types.

  7. Optional: In the mediaType attribute specify one of the following values to match the MIME type specified in step 3. These values map to icons provided by Lotus Connections:

    • generic

    • text

    • document

    • data

    • presentation

    • code

    • graphic

    • image

    • audio

    • video

    • compressed

    • contact

    • pdf

    See the topic File type icons.

  8. In each extension element specify the extensions that you want to map to the MIME type. Each value must be unique compared with other extension elements in the configuration file, or an error is returned when you start the system.

  9. Check in the changed configuration property keys using the following wsadmin client command:

      WikisConfigService.checkInConfig()
      

  10. To exit wsadmin, type exit at the prompt.

  11. Stop and restart the server hosting the Wikis feature.

 

Example


Change configuration property values


+

Search Tips   |   Advanced Search