[Solved] Sorry, this file type is not permitted for security reasons.

I want to import some data from my old form plugin using a .csv file. When I added that .csv file, it says the above message “Sorry, this file type is not permitted for security reasons.”.


I read in earlier posts that this might be due to CSV file MIME type is not included in the default set of file types (actually, I wonder why that is, aren’t all imports based on CSV files?) so I added the following function into my theme’s function.php:


add_filter('upload_mimes', 'add_custom_upload_mimes');
function add_custom_upload_mimes($existing_mimes){
$existing_mimes['csv'] = 'application/octet-stream'; //allow CSV files
return $existing_mimes;

But still no luck.


Here's another post with the correct mime type info.

Hi Stephanie, I changed that in my functions.php, but I'm still getting the same error message. I've also attached my CSV file in my previous reply.

This function works for me. Please try Google or other WordPress resources to help you solve your problem. You can upload the file directly into your WordPress media library. Blocking CSVs is being done by WordPress, not Formidable, and it only seems to block them on multi site installations.

I don't see how WP would be blocking CSV files, I was previously using it to import users and I didn't have any issues. I did upload the CSV file into media library, but the plugin insist on having me to pick a file from local directory, how can I ask it to go to the media library to find the file?

On step one of the import, to first line is "select csv or select previously uploaded CSV". Any CSV files will show there.

If you are on WP multisite, then go to the Network Settings panel. There's a field for adding file extensions for upload. If a single site installation, you have to write code.

vfontjr, what do you mean by the Network Settings? I check the site setting, didn't see any MIME related fields...

Hi, I've done a bunch of testing and it seems like I'm having some issues on my Mac trying to recognize the file. I've also tried virtualbox, but no luck. Looks like something's wrong with Mac can't recognized the file.

Unfortunately, the problem could only be solved when I move the site out of multisite installation.

Hiya @centrilin_tech,

There is a field in the Network Settings that helps with this. It's under upload settings on my install. Not sure if a plugin added it but it's there.

Also I have used this plugin successfully to add mime types.


Topic closed.