Sorry, this file type is not permitted for security reasons – with CSV import
-
When I try to import a product list with the standard import option found at the top of the product list, I get this error message
Sorry, this file type is not permitted for security reasons
According to this support post it is fixed in WP 5.0.1 but I am on 5.6.
And in this post you state that this might be caused by the hosting provider who blocks certain file types. That is not the case, because when I add this to wp-config I can upload the file just fine.
define(‘ALLOW_UNFILTERED_UPLOADS’, true);
Also, I can import products with this third partyWooCommerce import/export plugin.
Therefore to me this seems like a bug in WooCommerce.
The thing is
– I don’t want to allow all file types being uploaded
– I don’t want to use a plugin for something that WooCommerce has an option for already.I have also tried adding this mime type to functions.php like this, but that doesn’t solve the problem either.
add_filter( ‘upload_mimes’, ‘my_myme_types’, 1, 1 );function my_myme_types( $mime_types ) { $mime_types['txt'] = 'text/csv'; // Adds .csv extension return $mime_types; }
Thanks
JP
- The topic ‘Sorry, this file type is not permitted for security reasons – with CSV import’ is closed to new replies.