• Resolved word-wiz

    (@word-wiz)


    I have tried to solve the HTTP error on upload and crunching. I did it for my computer by changing the .htaccess file. I run the latest version of flash so all well.

    However, other people adding images might not run the latest version of flash and end up getting locked out of the server. I want to disable Flash upload completly. I have tried a method in functions.php

    add_filter( ‘flash_uploader’, create_function( ‘$a’,’return false;’ ), 5 );

    and the 2 available plugins (no flash uploader and disable flash uploader) but the Flash uploader just seems to keep on like nothing happened. You can enable and disable it just as before.

    These plugins not working with more up to date version of WP seems to be an issues – see link

    https://www.allancollins.net/193/wordpress-plugin-disable-flash-uploader/

    Anyone know a method that works to stop the Flash uploader from being available and potentially locking people out from the server?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • I see it’s been awhile since you posted this, but still there may be others like me who wanted to permanently disable the Flash uploader to ensure that the issue you mentioned is never encountered again. And so while I was going to try the plugins you mentioned.. I then realized I don’t want my clients able to change it back.

    So here is one way..note however that its going to be very hacky to do this, but if you don’t mind having an edited WordPress core file then you can manually ensure that the Flash uploader is never enabled using these steps.

    Steps

    1. Open “/wp-admin/includes/media.php”
    2. Open the search utility by pressing CTRL + F ( CMD + F on the Mac )
    3. Search for the term “flash” and find the area specified below.
    4. NOTE: In WP 3.2.1, the first result was on line 1454. If you end up on a different line due to WordPress version differences, you will know you are in the right place if you see something similar to the following:

      1454	$flash_action_url = admin_url('async-upload.php');
      1455
      1456	// If Mac and mod_security, no Flash. :(
      1457	$flash = true;
      1458	if ( false !== stripos($_SERVER['HTTP_USER_AGENT'], 'mac') && apache_mod_loaded('mod_security') )
      1459		$flash = false;
    5. Comment out line 1458 only using two forward slashes at the start of the line, and it should then look like this:
    6. 1458    // if (false !== stripos($_SERVER['HTTP_USER_AGENT'], 'mac') && apache_mod_loaded('mod_security') )

    There you are. A quick search and two keystrokes, and you are done. Won’t be any flash uploads goin’ on after that.

    Explanation: without that line, the code executes such that $flash is always false, tricking WP into thinking the user can’t use Flash.

    Thread Starter word-wiz

    (@word-wiz)

    Hi Mark,

    In the end I worked it out with the host to relax mod_security but only for the specific folder used by the uploader. He was happy with this compromise.

    I prefer using the multi file flash uploader just didnt want the risk of a lock out.

    Thanks for the reply.

    Awesome – you should mark the issue as resolved then.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Disabling Flash Uploader’ is closed to new replies.