Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

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

share|improve this question
    
Feel free to improve the question tags –  Gabriel Fair Jan 25 '12 at 16:37
add comment

1 Answer

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.