Forum


Error uploading .vcf files  

  RSS

dorianhbron
(@dorianhbron)
New Member
Joined: 2 years 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: 11
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: How to create a website that customer can make their own profile in there and observable via their pages
  2. How do I make my SVG larger within a HTML table?
  3. Replace result of a wordpress function in a hook
  4. i receive this email from my data center :“ We have detected abuse…”
  5. Is it wordpress plugin [on hold]
  6. After AWS Cloudfront Setup Browser Info is Incorrect
  7. wp mail smtp settings takes in custom created plugin
  8. Exclude page from restriction
  9. WP All-in-One Migration shows “wp-config already exists”
  10. contact form 7 wordpress dropdown

WordPress problems we are working on

  1. Wordpress multisite redirects subpages to homepage
  2. Programmatically add value to custom field based on custom field
  3. Failed to load resource: the server responded with a status of 503 ()
  4. How to find relavant element from an array based on index using number in the loop?
  5. Wordpress custom Gutenberg Block not reloading correctly
  6. Suddenly starts receiving alert when trying to login to wordpress admin panel
  7. Issue with polish character in FPDF
  8. How to fix theme thumbnails without uploading images to media library?
  9. Highlighting Current Page in Nav_Menu (WordPress) /w SASS
  10. API integration in WordPress to pass login details to app

Resolved issues

  1. How To Allow Special Characters & Capital Letters In Wp Permalink?
  2. Create Submenu with Redux Framework _WordPress
  3. Wordpress Boostrap NavMenu on mobile hides after displaying
  4. Can give access to only one Plugin?
  5. Youtube within a Paywall site
  6. How To Add Custom Fields in Dokan Vendor Dashboard
  7. How to extract Product attributes from Product Variations
  8. Stripe Payment Button Not Responsive
  9. Output ACF Flexible Content fields in a table (with the table header not to be repeated through loop)
  10. How do I create a sliding team section with variable positioning and z-indexes?
wppotion - powered by persistence and passion

Please Login or Register