I\'m unable to upload CSV file on the WordPress website
error: Sorry, this file type is not permitted for security reasons
Check the following
In case you are developing a custom theme , add this to your function.php to authorize mimes for uploads :
function my_custom_mime_types( $mimes ) {
// New allowed mime types.
$mimes['csv'] = 'text/csv';
// Optional. Remove a mime type.
unset( $mimes['exe'] );
return $mimes;
}
Add it to the filter upload_mimes
add_filter( 'upload_mimes', 'my_custom_mime_types' );
Check here the rest of all mimes type you can authorize.
The point here is that you are controlling all authorized mimes in your website .