Fixing The WordPress 2.5 Flash Uploader On Mac
15 April 2008I had a big problem getting WordPress’s new-fandangled flash image uploader working on my Mac; the flash uploader button wouldn’t appear and I always saw the standard single image uploader button.
After a bit of research using the Safari Develop menu, I found that using a Windows user agent made it appear, and a Mac user agent would hide it.
After a quick delve into WordPress’s code I found this in /wp-admin/includes/media.php, lines 769-772…
769: // If Mac and mod_security, no Flash.
770: $flash = true;
771: if ( false !== strpos(strtolower($_SERVER['HTTP_USER_AGENT']), ‘mac’) && apache_mod_loaded(’mod_security’) )
772: $flash = false;
…which turns off the flash uploader if you’re using a Mac and your website runs Apache and has the mod_security module loaded… mine does!
So, commenting out the bottom two lines…
769: // If Mac and mod_security, no Flash.
770: $flash = true;
771: // if ( false !== strpos(strtolower($_SERVER['HTTP_USER_AGENT']), ‘mac’) && apache_mod_loaded(’mod_security’) )
772: // $flash = false;
…now forces WordPress to show the flash uploader regardless.
Hurrah ![]()
