• I keep getting a message that the .webm video can’t be uploaded because of security restrictions. Why is that? Thanks for an answer.

Viewing 9 replies - 16 through 24 (of 24 total)
  • I wonder if the addition (in 3.6) of webm under the mime types for video formats is part of the road map for the native support for video in 3.6. I didn’t see it anywhere in the 3.5 version.

    Yes, not in 3.5 but so far so good for 3.6.

    Thread Starter williepabon

    (@williepabon)

    Well, since I’0 using 3.5.1, will need to modify the functions.php file to upload a .webm file. thanks

    Geeze, I’m not very good at this sort of thing by any means, but as an alternative to directly editing a WordPress core file, try adding a filter to the functions.php file in your current theme. I think something like this might do the trick:

    add_filter('upload_mimes','add_custom_mime_types');
    	function add_custom_mime_types($mimes){
    		return array_merge($mimes,array (
    			'webm' => 'video/webm',
    			));
    }

    I think if you add that to your themes functions.php file correctly instead of in the core file, it should allow you to upload webm to your media library as long as the file size doesn’t exceed your php upload limit.

    Good luck, whatever you decide to do!

    Thread Starter williepabon

    (@williepabon)

    Clayton:

    A similar piece of php code, I tried on the custom_functions.php file that my theme has, but it didn’t work, but I will try your version. Will let you know. Thanks.

    @claytonjames, yes, mime types and upload size are not the same monkey and have different mechanisms…both however can be limited (and often are) by a host.

    And, what is see is that WordPress will look for allowed mime types (WP3.5.1).

    Thread Starter williepabon

    (@williepabon)

    Clayton:

    Used your code in my custom-functions.php file, but it didn’t work. It appears that what there is in the WP functions.php file takes precedence over what I do on the theme functions.php. I know what need s to be done. It’s a matter of making a backup of the core file (if something goes wrong) and deciding to edit it. For me it will be the first time I do this kind of thing. Maybe, I’ll wait until WP version 3.6 is stable.

    @williepabon

    I tested the code in a very basic theme functions file and it allowed me to upload webm with the media up-loader, but it looks like it might disagree with your custom-functions.php file for some reason. Sorry it didn’t work out for you! Good luck!

    @seacoast Web Design

    Yep’. We know. Thanks for the heads up.

    @claytonjames
    Thanks for your code. Its working fine for me. I have tested wp 3.5.2 and above.

Viewing 9 replies - 16 through 24 (of 24 total)
  • The topic ‘Uploading .webm videos’ is closed to new replies.