Forum


Error uploading .vcf files  

  RSS

dorianhbron
(@dorianhbron)
New Member
Joined: 1 year ago
Posts: 1
13/03/2018 1:27 am  

I was able to upload several .vcf files last month into my WordPress Media Uploader. Now, I keep getting an error that says, "Sorry, this file type is not permitted for security reasons". I updated WordPress and all plugins, and still got the same error. I have downloaded and activated several plugins (only one installed at a time, of course) that claim to allow .vcf files in the MIME type. Still no luck, so I deleted each of the plugins.

WordPress version is now 4.9.4 running Divi Child theme.


Quote
leo
 leo
(@leo)
Active Member Admin
Joined: 4 years ago
Posts: 10
27/03/2018 10:01 am  

Hey, thanks for reporting the case. 

This become a well known issue lately. The easiest solution is to add the following line in your wp-config.php file:

define(‘ALLOW_UNFILTERED_UPLOADS’, true)

Another solution is to allow specific file types. This could easily be done by adding the following piece of code to functions.php of your theme. If yourDivi Child theme has its own functions.php file, please add the said code to it. Alternatively you may add it to functions.php part of the parent theme: 

function enable_extended_upload ( $mime_types =array() ) {

// The MIME types listed here will be allowed in the media library.

// You can add as many MIME types as you want.

$mime_types[‘gz’]  = ‘application/x-gzip’;

$mime_types[‘zip’]  = ‘application/zip’;

$mime_types[‘rtf’] = ‘application/rtf’;

$mime_types[‘ppt’] = ‘application/mspowerpoint’;

$mime_types[‘ps’] = ‘application/postscript’;

$mime_types[‘flv’] = ‘video/x-flv’;

// If you want to forbid specific file types which are otherwise allowed,

// specify them here.  You can add as many as possible.

unset( $mime_types[‘exe’] );

unset( $mime_types[‘bin’] );

return $mime_types;

}

add_filter(‘upload_mimes’, ‘enable_extended_upload’);

From security point of view, the second option is preferred. 

Please give a try to one of these options and let us know is we helped. 


ReplyQuote
Share:


We are not industry specific. We are WordPress specific. We work with everyone to help them find solutions with their troubles.
If you show us the problem you are experiencing, we will show you how to fix it. It is that simple.


Reported WordPress issues

  1. Wordpress Rest API showing theme custom fields within the end point url are refusing to update via a post command
  2. Generate new post WordPress based on MySQL database
  3. Iframe (ads) is blur in Chrome when it is resized to fit in sidebar div
  4. How to make a WordPress page mobile responsive?
  5. Permalink Settings You should update your web.config now [on hold]
  6. how to upload image to wordpress with flutter using REST API
  7. Setting CSS property - filter: blur(x) with JS for site-inner class within genesis framework; Cannot read property 'getAttribute' of null
  8. Error on wordpress on my VPS: Your PHP installation appears to be missing the MySQL extension which is required by WordPress [on hold]
  9. Netlify deploy with results of TypeError: Cannot read property 'replace' of undefined
  10. How to position text at the same vertical level across columns

WordPress problems we are working on

  1. How to target a specific group on Buddypress (WordPress) to show it on a widget?
  2. Is it possible for Month names to be shown in my language
  3. Displaying and grouping posts
  4. Wordpress custom endpoints (WP_REST_Controller) 404 only on mobile
  5. Set default value in database [on hold]
  6. How do I programmatically set a user as spam in BuddyPress?
  7. Can i edit styling of form in ultimate member wordpress plugin?
  8. wordpress product attribute not creating automatically only work size and color other attributes not work need to add manually again same attribute
  9. Uncaught Error: Syntax error, unrecognized expression on WordPress website
  10. Wordpress website hacked and .htaccess file is creating automatically with strange code

Resolved issues

  1. Wordpress gutenberg editor gallery first image missing [on hold]
  2. how to fix the error No Input file specified on wordpress when using .php extention on pages
  3. How do I integrate Chargebee api to wordpress?
  4. Sorting a wp_query with more than one 'orderby'?
  5. Wordpress API: Sort posts by sticky and date
  6. Column background color not showing up
  7. How to show a row for each column?
  8. Wordpress site's frontend css styles not loading [on hold]
  9. Get the just added term_id (WordPress)
  10. Permalink structure does not get updated
wppotion - powered by persistence and passion
  
Working

Please Login or Register