WordPress mime-config

What it does

This plugin allows you to configure extra mime-types for support by the inline-uploader.

How it works

A new options page is added as Options … Mime-types which allows you to add/delete the extra mime-types.

screenshot of the plugins options page

By default the following extra mime-types are registered: audio/ac3, audio/MPA and video/x-flv.

With version 0.90 of the plugin you are now able to upload a file containing a long list of mime types as an easy way to register multiple mime-types. The file format is “mime/type extension” for example like this:

    audio/ac3 ac3
    audio/MPA mpa
    video/x-flv flv

Requirements

This plugin requires WordPress 2.0 or later to function as it relies on the existence of the inline-uploader.
With WordPress 2.0.4 or later the plugin will also use the builtin nonce protection for all actions.

Download

The latest version of the plugin may be downloaded here: pjw-mime-config.0.90.zip

39 thoughts on “WordPress mime-config

  1. Nice, just what I needed. One problem though: there seems to be a problem with determining the file location. I have the “Organize my uploads into month- and year-based folders” option toggled but when I click “send to editor” it does not seem to be respected for files with a mime type I registered using your plugin (the file is in the right location but the link is not correct). If I correct the link manually it works. I don’t have this problem with photos. This may well be wordpress bug.

  2. Jilles: I can’t reproduce your problem here on my test setup. It maybe a WordPress bug related to your particular setup. What version of PHP are you using and on what operating system?

  3. I’m not sure about the OS (linux no doubt but don’t know which flavour). I’m currently using php 4. I know this because my provider has just announced that they will be switching to version 5 in a few days (2nd June) at the same time mysql will be upgraded from 3 to 5. I’ll keep an eye on the upgrade and check if the problem goes away. I have the Akismet and sidebarwidget plugin running and for the rest it is just a standard wordpress setup (though it did get upgraded several times 1.5->2->2.01->2.02). So that might be a reason for the bug.

    BTW. I was registering a mimetype for kmz files application/vnd.google-earth.kmz (googleearth specific).

  4. I’m hoping WordPress will suffice for a small intranet I’m setting up. We need the ability to upload files (Powerpoint, Word, Excel, PDFs) so they’ll be available for others to comment on and download. I came across your page in my search. Will your plug-in allow for this? Forgive the naive question, but I’m new to WordPress and the vast array of plug-ins available.

  5. Scott: WordPress has the builtin ability to allow you to upload files. There is however a list of file types that it will let you upload. My plugin allows you to extend the list of filetypes if the default list does not contain the filetype you wish to upload. Looking through your list and comparing it to the list that WordPress supports I think you will be OK without my plugin for your current upload needs.

  6. I was able to reproduce the full path bug as follows (this is with 0.90):

    1. upload a file with a custom mime type
    2. Click Send to Editor (non-WYSIWYG mode) — works
    3. Click Using Title to switch it to Using Filename
    4. Click Send to Editor — does not insert the full path
    5. Click Using Filename to switch back to Using Title
    6. Click Send to Editor — still does not insert the full path

    After saving the post, it works again, until an option is changed.

Comments are closed.