1 0 Tag Archives: tips
post icon

WordPress File Upload Error Security Fix

Here’s how to fix the “WordPress File Type does not meet security guidelines” error you get from trying to upload certain files.

First find out what the mime type of the file you were trying to upload is. You can go to w3schools or mozdev

Write down the file type ie: (application/x-shockwave-flash, or video/x-m4v) you also need the extension ie: (swf or m4v)

For WP 2.0 and up open up the wp-includes/functions.php file and goto around line 1069 All you have to do is follow the coding conventions in there and add your file types you want. Because they use a foreach loop to go through all the listed file types you can add as many as you like as long as they follow the convention there. For older versions of WP I think the correct file is: wp-admin/admin-functions.php

Look for this:

function wp_check_filetype($filename, $mimes = null) {
 // Accepted MIME types are set here as PCRE unless provided.
 $mimes = is_array($mimes) ? $mimes : apply_filters('upload_mimes', array (
  'vcf' => 'text/x-vcard',
  'jpg|jpeg|jpe' => 'image/jpeg',
  'gif' => 'image/gif',
  'png' => 'image/png',
  'bmp' => 'image/bmp',
  'tif|tiff' => 'image/tiff',

For people that don’t like hacking WordPress core files checkout Mike’s comment below…

Leave a Comment
post icon

Podcasting made easy

Podcasters should check out Ubercaster. They offer a sweet, and I mean sweet, application for creating audio podcasts really easily. It combines all the preparing, recording, editing, and releasing into one application. You can add all the ID3 tags and then export it ready for the web. There’s a ton of cool features so check it out.

Leave a Comment
post icon

How to make files download or load in the browser

This is how to make a file, (.mov, .pdf or in my case a vCard .vcf) download to your desktop instead of loading into the browser window. The problem I had was that my vCard was opening as text in the browser window, which is not useful to anyone. To fix this all you have to do is add a “mime type” to your server using your hosts tools in the control panel. You could also add the “AddType” line to your .htaccess file as well. I deleted my mime type for .mov files and my .mov files now load into the browser window instead of downloading to my desktop. Again here is the resource list for all mime types and more.

Leave a Comment
post icon

Mac OS X Keyboard Sleep Shortcut

After being a full mac user for about 6 years now, i’ve started to notice how much I use “keyboard shortcuts”. They make things easy and quick. Here’s one that I just learned that puts your mac to sleep:

Option-Command-Eject or
Option-Command-Power

Check out Apple’s page to see some more useful shortcuts. Also to see and edit your keyboard shortcuts open your system preferences ->keyboard/mouse->keyboard shortcuts.

Leave a Comment