Search:

Apache » Lenya
project logo
  • Project
  • Developer
  • Community
  • Version 2.0
  • Version 1.2
  • Version 1.2
    • Installation
      • Download
      • Subversion Access
      • Install Instructions
    • Tutorial
      • Introduction
      • 1. Understanding Lenya
      • 2. Installing Lenya
      • 3. Anatomy of the Pipeline
      • 4. Editing in Lenya
      • 5. Custom Navigation in Lenya
      • 6a. Mod Proxy and Lenya
      • 6b. Mod Proxy and Lenya
    • How-To
      • FAQ
      • New Publication
      • Deploy Publication
      • Look and Feel
      • Custom Resource Type
      • Adding Mime Types
      • Site Navigation
      • LDAP Authentication
      • CMS Menus
      • CMS Screens
      • Search Publications
      • External Data
      • Unit Tests
    • Components
      • Access Control
        • Basic Terms
        • Access Controllers
        • Access Controller Resolvers
        • Authenticators
        • Authorizers
        • Policies and Policy Managers
        • Accreditable Managers
        • SSL Encryption
      • Authoring
        • Adding a new document creator
        • Image Upload
        • OpenOffice
      • Deployment
        • Proxying
      • Editors
        • HTML Form Editor
        • HTML One Form Editor
        • Bitflux Editor
        • Kupu
        • Xopus
      • Layout
        • Navigation
        • XHTML templating
        • Serving static resources
        • Lenya Menubar
      • Publication
        • PageEnvelopeModule
        • Site tree
      • Resource Types
        • Resource Types
      • Revision Control
        • Revision Controller
        • RCML
        • Check In
        • Check Out
        • Revisions
        • Rollback
      • Repository
        • WebDAV Servers
      • Search
        • Searching with Lucene
      • URI Handling
        • URI Parametrizer
        • URI Scheme
        • Usecases
      • Asset Management
        • Asset Management
      • Link Management
        • Link Management
      • Meta Data
        • Meta Data Handling
      • Multilingual Documents
        • Multilingual Document Handling
      • Tasks
        • The Task Concept
        • Defining Tasks
        • The TaskAction
        • Scheduling a Task
        • Included tasks
          • AntTask
          • DefaultFilePublisher
          • StaticHTMLExporter
          • MailTask
        • Developing Tasks
      • Workflow
        • Terms
        • The State Machine
        • Configuration
        • Implementation
      • Site Management
        • Archive
        • Copy
        • Deactivate
        • Delete
        • Delete the trash
        • Move
        • Move Up/Down
        • Rename
        • Restore
    • Miscellaneous
      • Namespaces
      • Reserved Names
      • XInclude Processor
    • 1.2 API (Javadoc)

Current Event

Built with Apache Lenya

Adding a Mime Type How-To

Table of Contents
  • Enabling the downloads
  • Enabling uploading for content editors

Lenya comes with many mime types supported "off-the-shelf". However the list of mime types is not (and can not be) exhaustive. If you have a Mime-Type which is not yet known to Lenya, such as Avi Videos (Mime-type video/x-msvideo) that the content editors of your site insist on using, proceed as described here.

Enabling the downloads

The resource types which are known to your Lenya installation are defined in the file lenya/resources.xmap. Add the new Mime-Type in here, for example for AVI this is:

          <map:match pattern="*/*/**.avi">
            <map:read src="pubs/{1}/resources/{2}/{3}.avi" mime-tyoe="video/x-msvideo" />
          </map:match>

You probably need to restart your servlet container in order for the changes to take effect.

Now, visitors of your pages should be able to download objects of this mime-type.

Enabling uploading for content editors

In the asset handling, there are some restrictions as to what filetypes you are allowed to upload. If the file extension you require is not yet allowed, edit the file xslt/authoring/asset.xsl and add it to the list of types defined in  <xsl:param name="extensions" ...

If you are using BXE, edit the file xslt/bxeng/asset.xsl and add it to the list of types defined in <xsl:param name="extensions" ...

Copyright © 1999-2011 The Apache Software Foundation. All rights reserved.

Apache Lenya, Apache, and the Apache feather logo are trademarks of The Apache Software Foundation.