pagestudiocms / cms

[OUTDATED] The source code to the open source version of PageStudio, not http://pagestudiocms.com
MIT License
1 stars 2 forks source link

Content Encoding Error: No Image Thumbnail Preview #39

Closed cosmomathieu closed 8 years ago

cosmomathieu commented 8 years ago

When using GZip, the content/pages/create-thumb throws a Content Encoding Error. The image thumbnail is never created and therefore never returned to the image upload content type.

To resolve this ad ob_start('ob_gzhandler') to the create-thumb method.

public function create_thumb()
    {
        if ( ! is_ajax())
        {
            return show_404();
        }
        ob_start('ob_gzhandler');

        if ($this->input->post('image_path'))
        {
            echo image_thumb($this->input->post('image_path'), 150, 150, FALSE, array('no_image_image' => ADMIN_NO_IMAGE));
        }
    }