In case after following the above documentations if the error is still shown as “This file type cannot be uploaded due to security reasons.” Then follow the below steps:
1. Add this line to the wp-config.php file: define( ‘ALLOW_UNFILTERED_UPLOADS’, true );