Please fix it for me. Its killing my life almost 2 days and I need fix it as soon as possible. Because its live now. Code was working my local Wampserver.
When choose upload image, its just stuck on 100% and spinning loader appear. After one or two minutes "An error has occurred on uploading" will appear. Assets, Uploads, Images, Thumbs folders has 777 permission.
public function news() { $this->grocery_crud->set_table('news'); $this->grocery_crud->display_as('title', 'Гарчиг')->display_as('body', 'Контент')->display_as('title_en', 'Ðнгли гарчиг')->display_as('body_en', 'Ðнгли Контент')->display_as('featured', 'Томоор гаргах ÑÑÑÑ…')->display_as('image', 'Зураг')->display_as('datetime', 'Огноо')->display_as('showenglish', 'Ðнгли Ñ…ÑлÑнд харуулах'); $this->grocery_crud->required_fields('title', 'body', 'datetime', 'featured', 'image', 'showenglish'); $this->grocery_crud->set_field_upload('image', 'assets/uploads/images'); $this->grocery_crud->callback_after_upload(array($this, 'after_upload_pic')); $this->grocery_crud->field_type('featured', 'true_false'); $this->grocery_crud->field_type('showenglish', 'true_false'); $output = $this->grocery_crud->render(); $this->_example_output($output); } public function after_upload_pic($uploader_response, $field_info, $files_to_upload) { $this->load->library('md_image'); $file_uploaded = $field_info->upload_path . '/' . $uploader_response[0]->name; $data = getimagesize($file_uploaded); $source_width = $data[0]; $source_height = $data[1]; $this->md_image->crop_to_ratio($file_uploaded, $source_width, $source_height, '620px', '250px', 'assets/uploads/images/featured/'); $this->md_image->resize_image($file_uploaded, '140px', '85px', 'assets/uploads/images/thumbs/'); }