Jump to content


An error has occurred on uploading

error problem image upload

  • Please log in to reply
33 replies to this topic

#1 Гэрэлт-Од Гоцбаяр

Гэрэлт-Од Гоцбаяр

    Member

  • Members
  • PipPip
  • 18 posts

Posted 28 March 2013 - 08:43 AM

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/');
    }

 

 

Attached Thumbnails

  • screenshot.1255.jpg


#2 victor

victor

    grocery CRUD Hero

  • Advanced Member
  • PipPipPip
  • 967 posts
  • LocationMinsk

Posted 29 March 2013 - 07:55 AM

give me access



#3 Гэрэлт-Од Гоцбаяр

Гэрэлт-Од Гоцбаяр

    Member

  • Members
  • PipPip
  • 18 posts

Posted 29 March 2013 - 08:58 AM

Can we talk by gmail, yahoo or skype?



#4 victor

victor

    grocery CRUD Hero

  • Advanced Member
  • PipPipPip
  • 967 posts
  • LocationMinsk

Posted 29 March 2013 - 08:58 AM

skype -  ipgolovko



#5 Alvin Firdaus

Alvin Firdaus

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 01 May 2013 - 02:52 PM

I get same problem, can you help me to fix this probelm?

I success upload in localhost but error in server hosting.. Please help.... :(



#6 Alvin Firdaus

Alvin Firdaus

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 01 May 2013 - 02:57 PM

When i check in upload folder, i found that images but upload report is "An error has occurred on uploading".

Sorry with my bad english.



#7 victor

victor

    grocery CRUD Hero

  • Advanced Member
  • PipPipPip
  • 967 posts
  • LocationMinsk

Posted 01 May 2013 - 03:06 PM

Hi Alvin and welcome to the forum.
Which notice do you get in console?
And show your code.


#8 Alvin Firdaus

Alvin Firdaus

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 01 May 2013 - 03:13 PM

my code :
        $crud = new grocery_CRUD();

        $crud->set_table('tbl_link');
        $crud->set_subject('Link');
        $crud->required_fields('label','link','images');
        $crud->set_field_upload('images','asset/dataweb');
        $crud->field_type('id_link', 'hidden');
        
        $output = $crud->render();
      

 

notice -> "An error has occurred on uploading"
please help me... :(



#9 Alvin Firdaus

Alvin Firdaus

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 01 May 2013 - 03:30 PM

I try to upload, but i get this notice.

capture.png
 



#10 victor

victor

    grocery CRUD Hero

  • Advanced Member
  • PipPipPip
  • 967 posts
  • LocationMinsk

Posted 01 May 2013 - 03:37 PM

do you use debug panel (in browser) for debugging?



#11 Alvin Firdaus

Alvin Firdaus

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 01 May 2013 - 03:44 PM

No, I dont
what is function?
what's my wrong code?
I think my problem same with
Гэрэлт-Од Гоцбаяр.
Can you fix it, Mr. victor?



#12 victor

victor

    grocery CRUD Hero

  • Advanced Member
  • PipPipPip
  • 967 posts
  • LocationMinsk

Posted 01 May 2013 - 04:18 PM

https://developers.g...eveloper-tools/



#13 victor

victor

    grocery CRUD Hero

  • Advanced Member
  • PipPipPip
  • 967 posts
  • LocationMinsk

Posted 01 May 2013 - 04:21 PM

you can look at server response using that panel.
If your project is on production server I can take a look at your project


#14 victor

victor

    grocery CRUD Hero

  • Advanced Member
  • PipPipPip
  • 967 posts
  • LocationMinsk

Posted 01 May 2013 - 04:24 PM

you can use CI log functionality too



#15 victor

victor

    grocery CRUD Hero

  • Advanced Member
  • PipPipPip
  • 967 posts
  • LocationMinsk

Posted 01 May 2013 - 04:27 PM

Гэрэлт-Од Гоцбаяр had a bug in php code

#16 Alvin Firdaus

Alvin Firdaus

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 02 May 2013 - 05:34 AM

I found my mistake, error code if only i add $this->load->model('Webadmin_model');

 

failed upload

 function __construct()
    {
        parent::__construct();
        
        $this->load->database();
        $this->load->helper('url');
        
        $this->load->library('grocery_CRUD');  
        $this->load->model('Webadmin_model');
    }

 

Success upload

 function __construct()
    {
        parent::__construct();
        
        $this->load->database();
        $this->load->helper('url');
        
        $this->load->library('grocery_CRUD');    
    }

 

But, i need "$this->load->model('Webadmin_model');" for another function, so what should i do for fix it?



#17 victor

victor

    grocery CRUD Hero

  • Advanced Member
  • PipPipPip
  • 967 posts
  • LocationMinsk

Posted 02 May 2013 - 06:38 AM

what error do you get?

#18 Carlos

Carlos

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 30 May 2013 - 07:03 AM

Hello, I need you help my please!!! i get this notice "

 

"An error has ocurred on uploading"

 

 

In the browser Chrome Console:

 

  1. POST http://localhost/int...upload_file/url 500 (Internal Server Error)
  2. jquery-1.8.2.min.js:2

 

"



#19 victor

victor

    grocery CRUD Hero

  • Advanced Member
  • PipPipPip
  • 967 posts
  • LocationMinsk

Posted 30 May 2013 - 07:30 AM

type this in the index.php 

 

ini_set('display_errors',"On");



#20 Carlos

Carlos

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 04 June 2013 - 07:34 AM

Hi Victor, I get this error:

 

{"success":true,"files":[]}

 

In the database field is of type varchar 250 is okay?

 

In the firebug:

 

  1. POST http://localhost/int...upload_file/url 500 (Internal Server Error) jquery-1.8.2.min.js:2

error.jpg







Also tagged with one or more of these keywords: error, problem, image, upload

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users