• Hi all,

    I’ve been unable to upload .otf files to Media Library with the following error: “Sorry, this file type is not permitted for security reasons.” I’ve searched the forums and this has been noted before with other file types. Most posts are from several months to years ago.

    What is the latest (and best way) around this?

    Ivan

    • This topic was modified 4 years, 6 months ago by Jan Dembowski.
    • This topic was modified 4 years, 6 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not a Developing with WordPress topic
Viewing 2 replies - 1 through 2 (of 2 total)
  • You may have some luck in the plugins directory. Search on something similar to this: https://wordpress.org/plugins/search/file+types/

    What you are looking for is a plugin that will allow you to add file extensions to the default list of allowed file types.

    Very easy to fix if you have admin access.

    Add the following to functions.php in your theme’s folder:
    //* allow otf file upload to media library
    add_filter(‘upload_mimes’, ‘custom_upload_mimes’);
    function custom_upload_mimes ( $existing_mimes=array() ) {
    // add your extension to the array
    $existing_mimes[‘otf’] = ‘application/otf’;
    return $existing_mimes;
    }

    Works with any file type as long as you find the correct mime type.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Unable to upload .otf file to media library due to “security reasons”.’ is closed to new replies.