WordPress.org

Ready to get started?Download WordPress

Forums

HTML5 Videos
[resolved] Security error? (4 posts)

  1. smlombardi
    Member
    Posted 1 year ago #

    I just tried to upload all 3 video formats. 2 worked fine but this had an error:

    “HolidayAnimation_Intranet.webmsd.webm” has failed to upload due to an error
    Sorry, this file type is not permitted for security reasons.

    http://wordpress.org/extend/plugins/html5-videos/

  2. powercat74
    Member
    Plugin Author

    Posted 1 year ago #

    If you are on a single installation of WordPress, add this to your wp-config.php file in the root of the site:

    define('ALLOW_UNFILTERED_UPLOADS',true);

    If you are on a network installation, add .webm to the list of allowed file types under the Network Administration page.

    Thanks!

    Dustin

  3. whatachamp
    Member
    Posted 1 year ago #

    Even after doing that, the visual editor won't recognise the .webm file I uploaded.

  4. powercat74
    Member
    Plugin Author

    Posted 1 year ago #

    You can add this to your functions.php file. It will define all three formats as acceptable:

    function add_webm_mime_for_upload($mimes) {
    $mimes = array_merge($mimes, array(
    'webm' => 'video/webm',
    'mp4' => 'video/mp4',
    'ogv' => 'video/ogg'
    ));

    return $mimes;
    }
    add_filter('upload_mimes', 'add_webm_mime_for_upload');

    More information can be found here: http://codex.wordpress.org/Plugin_API/Filter_Reference/upload_mimes

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags