Forum


Error uploading .vcf files  

  RSS

dorianhbron
(@dorianhbron)
New Member
Joined: 12 months 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.


ReplyQuote
leo
 leo
(@leo)
Active Member Admin
Joined: 3 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.org doesn't send me the email with the password for the wp.org account
  2. how to create custom advanced search in wordpress
  3. WordPress: Placing a function underneath the title instead of above it
  4. Is There A Way To Stop Other WP Plugins Features Being Available On My Wordpress Plugins Pages?
  5. wpdb Cannot Update column in Database
  6. Homepage redirects to /wordpress
  7. How to can implement bootstrap widget code for custom header in WordPress?
  8. Tracking Wordpress Ninja Forms Form with Google Tag Manager
  9. Not able to retrieve the exact queried response using Alamofire
  10. Show item from a array only to admins

WordPress problems we are working on

  1. LIST of phrases AFTER a parameter from URL in wordpress
  2. How to display a value from a radio button in the options menu in wordpress
  3. How to specify a cache validator for PNG and JS files in .htaccess?
  4. Changing font size within declaration
  5. Is there anyway to use colspan on the do_settings_fields in WordPress
  6. API Call doesn't echo items
  7. PHP Warning: A non-numeric value encountered in /home/bradlux/public_html/wp-content/plugins/wp-automatic/core.php on line 3797 [on hold]
  8. Bypass cannot redeclare function (including Wordpress in Osclass)
  9. ACF get data for all posts
  10. TinyMCE Paste as text but keep spaces

Resolved issues

  1. I can't get my WordPress site load speed any faster
  2. Error establishing a database connection in my localhost
  3. Redirect loop in wordpress behind Azure Application Gateway
  4. How to attach custom taxonomy to a post in Wordpress?
  5. Php Script For Data Retrieval Giving Same Results On Server
  6. Connection between custom database and wordpress database
  7. Xpath expression: How can I get all XML elements that have a child node with a specific value?
  8. Avada Custom Element Creation
  9. Error message reads timber not activated or scheduled maintenance
  10. Tooltip with title and featured image Wordpress function
wppotion - powered by persistence and passion
  
Working

Please Login or Register