Viewing 16 replies (of 16 total)
  • Thanks again for your reply. Found a pretty decent solution that can be added to functions.php if anyone else is having the same issue. It allows you to specify a max upload value for WP and results in the proper value being displayed on the media upload page and gives a more details error response if you attempt to upload a file too large.

    // Filters the max upload size allowed
    function pre_set_upload_size_limit($size) {
    
         if (! current_user_can('manage_options')) {
            $size = 1024 * 1000 * 10;
         }
    
        return $size;
    }
    add_filter('upload_size_limit', 'pre_set_upload_size_limit', 20);

    If you want to apply this limit even to the admin level account, remove the if() part

    Also see: https://developer.www.ads-software.com/reference/hooks/upload_size_limit/

    • This reply was modified 8 years, 4 months ago by joejoe04.
    • This reply was modified 8 years, 4 months ago by joejoe04.
Viewing 16 replies (of 16 total)
  • The topic ‘Large Media File Uploads Generate HTTP error’ is closed to new replies.