Extend the list of MIME-types supported by the builtin uploader in 3.3

Goal

I want to be able to extend the list of mime-types supported by the builtin uploader in wp 3.3.1

For example when I try to upload an .apk file to our class blog, I get a
Sorry, this file type is not permitted for security reasons. error.

Read More

Question

In 3.3 has there been any changes to the way the file type whitelist is managed that is causing me not to be able to fix this?

Already tried

Activating wp codex and going to the Network Admin Settings page, adding to the Upload file types. That doesn’t work, no change.

Also I have tried the ‘upload_mimes’ method by adding the code to functions.php. That doesn’t work, no change.

And lastly I have tried the PJW Mime Config which doesn’t even work for the examples the user provided. Granted this plugin was last edited in 2009

Related posts

Leave a Reply

1 comment

  1. I’ve used this to add webm support to the wordpress 3.3.1 uploader.

    add_filter('upload_mimes', array(&$this, 'addUploadMimes'), 1, 1);
    
    public function addUploadMimes($mimes){
             $mimes = array_merge($mimes, array(
                    'webm' => 'video/webm'
                 ));
                return $mimes;
        }
    

    I had to make it run with a high priority to stick.