Home

 

Configure MIME types

You can assign Multipurpose Internet Mail Extensions (MIME) types to file extensions, and assign icons to MIME types.

You can configure Files to assign a specific MIME type to files with specific extensions. Files 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 uploaded 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 Files API for information about how to assign MIME types through the API.

Optionally, you can also configure Files 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 the wsadmin client.

  2. Access the Files configuration files...

  3. Network deployment:

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

  4. Check out the Files configuration files...

    FilesConfigService.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: Type the following command while in the wsadmin command processor:

        print AdminControl.getCell()
        

    For example:

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

  5. Navigate to the working specified in step 3 and open the mime-files-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 5. 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:

      FilesConfigService.checkInConfig()
      

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

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

 

Example


Change configuration property values

Files API

 

Related tasks

Start the wsadmin client


+

Search Tips   |   Advanced Search