Support » Plugin: Widget Settings Importer/Exporter » Sorry, this file type is not permitted for security reasons

  • tsvetnoff

    (@tsvetnoff)


    “Sorry, this file type is not permitted for security reasons.”

    I tried to add to functions.php of theme:
    function additional_mime_types( $mimes ) {
    $mimes[‘json’] = ‘application/json’;
    return $mimes;
    }
    add_filter( ‘upload_mimes’, ‘additional_mime_types’ );

    Tried to add to functions.php in wp-includes in stroke 2448:
    ‘json’ => ‘application/json’,

    Tried to install WP REST API and PJW Mime Config plugins. Nothing fixes this permittion! :((( Help, please!

Viewing 11 replies - 1 through 11 (of 11 total)
  • tttgroup

    (@tttgroup)

    i am having the same issue trying to upload a .mp4 video allowed by word press and getting the same error any clue how to solve it

    tttgroup

    (@tttgroup)

    apparently i rested the site the error did not go then i try uploading a different name from different folder and it went fine .. I guess that some how word press is trying to make things difficult for the users in the name of security making things paranoid online as the world is not yet enough damage in the name of security.
    Peace and Relax

    tsvetnoff

    (@tsvetnoff)

    I already solved the problem. I added this to wp-config.php:
    define(‘ALLOW_UNFILTERED_UPLOADS’, true);
    It allowed to upload forbidden files.
    P.S.- You can delete it after all for more security.

    Bro can you tell me the process to do this

    Hi, I’m suddenly unable to upload pdf files. I understood that 4.7.2 was supposed to fix these issues, but no luck. Will there be another update addressing this soon?

    yes, add define(‘ALLOW_UNFILTERED_UPLOADS’, true);
    to your wp-config.php
    but, there is a problem in the latest wordpress that requires super-admin privs for it to work.

    There’s probably a db entry for file types allowed anyway (well it should to be compatible with standard coding practices) but if you want a quick fix,
    backup the file *capabilities.php (in the wp-includes directory) and make these changes if you want it to work and are only logged in as admin.

    find the unfilter_upload section and change to:

    case ‘unfiltered_upload’:
    if ( defined(‘ALLOW_UNFILTERED_UPLOADS’) && ALLOW_UNFILTERED_UPLOADS && ( !is_multisite() || is_super_admin( $user_id ) ) )
    $caps[] = $cap;
    else
    /* temporary removed this for work around
    $caps[] = ‘do_not_allow’;
    and changed to this after comments
    */
    $caps[] = $cap;
    break;

    the wp_config.php change mentioned previously will work after that.

    !!Just back up the files first incase you make a mistake!!

    Simply add this code “define(‘ALLOW_UNFILTERED_UPLOADS’, true);” to wp-config.php file just above the following statement /* That’s all, stop editing! Happy blogging. */

    Solution found in this website

    I’m having the same issue with mp3’s and m4a’s
    I’ve uploaded many of them in the past but suddenly it gives me the “Sorry, this file type is not permitted for security reasons.” error.
    Please help!!

    none of these solutions work for me i still need help with this.i run a music website and this is frustrating.

    We’re having the same issue here. Multisite install; only super-admins can upload WOFF (web font) files. We discovered this problem last Friday (10 Mar 2017).

    At first, I thought it was because the MIME type had changed from application/x-font-woff to application/font-woff, and WordPress simply didn’t know what x-font-woffs were anymore.

    But when I temporarily gave my colleague super-admin rights to the multisite network, she could upload her WOFFs once again. However, one other curious behavior: when I upload a font (I’m the super-admin), they’re correctly tagged as application/font-woff. When my colleague uploaded her WOFF, it was tagged as application/octet-stream.

    From a security standpoint, I’m not comfortable setting ALLOW_UNFILTERED_UPLOADS to true, and I certainly can’t just promote all our Admins to super-admins.

    We need our regular Admins to be able to upload their own WOFF files just like they were doing about a month or so ago.

    Sorry, this file type is not permitted for security reasons

    File type .ogv is not working

    As per https://en.support.wordpress.com/accepted-filetypes/ .ogv file type is allowed in media but it’s not working for me, any luck?

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Sorry, this file type is not permitted for security reasons’ is closed to new replies.