Hi everyone!
There is another one cause and a solution for it.
Using define(‘ALLOW_UNFILTERED_UPLOADS’, true);
isn’t a good practice so we need to look deeper.
I’ve found out that, in some cases, php extension fileinfo
works not good enough and cannot determine MIME of csv files properly.
In that case I use next recipe:
1. Go to wordpress/wp-includes/functions.php
2. Find finfo_open( FILEINFO_MIME_TYPE );
3. Enrich it with a path to a magic database (details) and get something like $finfo = finfo_open( FILEINFO_MIME_TYPE, '/usr/share/misc/magic' );
4. Add if block if ( false === $real_mime ) $real_mime = 'text/plain';
after finfo_close( $finfo );
This solution works only if php extension on your hosting works improperly.
If you have another cause of issue, it won’t work
And also because it is a core hack you need to add it again after each update.