• Good Afternoon,

    I am having problem uploading a file with a .rcdx extension
    the software reports

    PD785-25052016.rcdx
    Sorry, this file type is not permitted for security reasons.

    Is there a way I can tell WP to except this file please

    All the best from Alan

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi Alan,

    Here’s an article on how to modify permitted file types by modifying your wp-config.php file.

    Cheers,

    Rob

    Thread Starter finelock

    (@finelock)

    Hi Rob,

    Thank you for that I used the quick line define(‘ALLOW_UNFILTERED_UPLOADS’, true);
    That solves the problem, but makes the website not secure

    What I would like to do is use this

    add_filter(‘upload_mimes’, ‘pixert_upload_types’);
    function pixert_upload_types($existing_mimes=array()){
    $existing_mimes[‘flv’] = ‘video/x-flv’;
    $existing_mimes[‘mid’] = ‘audio/midi’;
    return $existing_mimes;
    }

    But I am not sure what to put in for names it is .rcdx as an extension but the file is not audio or video , it is a database file for a radio.

    What would you suggest please

    All the best from Alan

    Hi Alan,

    The following should do it:

    add_filter('upload_mimes', 'custom_upload_mimes');
    function custom_upload_mimes ( $existing_mimes=array() ) {
        $existing_mimes['rcdx'] = 'text/plain';
        return $existing_mimes;
    }

    Here’s a link to the Upload Mimes Filter documentation on the Codex.

    Cheers,

    Rob

    Thread Starter finelock

    (@finelock)

    Good Afternoon Rob,

    Excellent works a treat, thank you for that, bit more info to add to my black book ??

    All the best from Alan

    Excellent! Glad you came right.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WP 4.5.2 Uplaoding Problem’ is closed to new replies.