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: 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. Is it possible to combine a Wordpress template (Semplice) and some HTML & CSS pages?
  2. User id gets unintended suffix at registration
  3. How to use react-sortable-hoc with WordPress Gutenberg
  4. How can i integrate Python scraping script with WordPress?
  5. Ordering WP Posts by Custom Taxonomy
  6. categories click redirect me to www.mysite.com/mysite.com/category (wordpress)
  7. Fixing Advanced Custom Fields “Error uploading file. Please try again.”
  8. Updating ID of wp_posts and post_id of wp_postmeta causes losing content in the web page, why?
  9. How do I autolink in post text that is an exact match of custom taxonomy term & auto tag that taxonomy term against the post on save
  10. Keep getting “customer” sign ups from @Bigg.pw. How to stop

WordPress problems we are working on

  1. Add Javascript to wordpress post Not Working
  2. Exporting to Wordpress
  3. WP: How do I use a value from a custom field to generate the permalink on post editing
  4. I can't connect to the webserver
  5. word-press dashboard isn't showing at all even after re-installing word-press
  6. Text of the email according to the product
  7. WordPress: Image type for Front-End post submission form
  8. admin-ajax.php returning 404 status code sporadically
  9. Upload CSV file, convert to JSON file using PHP
  10. Adding a new navigation menu to WP theme

Resolved issues

  1. How to store and save input fields dynamically generated by users in Wordpress?
  2. How to fix featured image quality that appears on mobile devices?
  3. Htaccess Redirect to different folders
  4. Excerpt() not working in my theme (original)
  5. How to generate audio shortcode when there's an mp3 in a link tag in Wordpress
  6. How can I get access to wordpress functions in my ajax-called php script
  7. Wordpress returning 404 for multisite pages
  8. How to call function from other plugin to my plugin [on hold]
  9. Redirect 301 not working properly. How to fix it?
  10. Limit Wordpress Network site posts
wppotion - powered by persistence and passion
  
Working

Please Login or Register