⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Grocery_Crud_Multiuploader library



nuski

nuski
  • profile picture
  • Member

Posted 05 November 2015 - 12:33 PM

Removed


khayeseah

khayeseah
  • profile picture
  • Member

Posted 31 May 2018 - 08:56 AM

Sent Today, 04:21 PM

Please help, i am using multiupload, all uploaded files using mulitupload was saved to the database not showing in the grid. It only displays "no files". How to fix this? Please help =(

Profile | Sector | Category | Gallery |Logout




Add Profile

ba95c-srac-message-ph-eiti-conference-2018.pdf

167
BAMBOO
Sample


No Files
94889-user-manual-template.docx

166

No Files


165
ENVIRONMENT
Highlights of President Duterte's...

Highlights of President Duterte's...
No Files


164
MINING
Mining Industry in the Philippines
The Manila Times

No Files


163
MINING
Gina Lopez blasts moves to again...


No Files


162



No Files


161
ENVIRONMENT
Green tips for Christmas and New...


No Files
  •  

khayeseah

khayeseah
  • profile picture
  • Member

Posted 11 June 2018 - 06:54 AM

Got the same issue.

When added to crud, the uploads are correct, however, when saving data and returning to list view, the value for filelds set as upload type will have a null value, in other words, files url are not being saved as field values

 

You would get "No files" as value in view list

 

Please help

 

here's my code

 

public function profile()
{
  if( ! ini_get('date.timezone') )
{
date_default_timezone_set('GMT');
}
 
  try{
 
    //$crud = new grocery_CRUD();
    //$crud = new ajax_grocery_CRUD();
 
    $crud = new Grocery_CRUD_Multiuploader();
 
    //$crud->set_js('assets/grocery_crud/js/jquery-1.11.1.js');
    //$crud->set_js('assets/grocery_crud/js/custom.js');
 
    //$sector_output = $this->_get_sector_output();
 
    $crud->set_subject('Profile');
    $crud->set_table('profile');
 
    $crud->set_relation('sector_name','sector', 'sector_name');
 
    $crud->columns('profile_code', 'sector_name','title', 'source', 'body', 'file_upload', 'photo_upload');
    $crud->fields('sector_name','title', 'source', 'date_created', 'created_by', 'body', 'file_upload', 'photo_upload', 'date_updated', 'updated_by');
    $crud->display_as('profile_code','Profile Code');
    //$crud->field_type('sector_name','dropdown',array('1' => 'BIODIVERSITY', '2' => 'DENR','3' => 'ECOSYSTEM' , '4' => 'FORESTRY'));
    $crud->display_as('sector_name','Sector Name');
    $crud->display_as('title','Title');
    $crud->display_as('source','Source');
    $crud->display_as('date_created','Date Created');
    $crud->display_as('created_by','Created By');
    $crud->display_as('date_updated','Date Updated');
    $crud->display_as('updated_by','Updated By');
    $crud->display_as('body','Body');
    $crud->display_as('photo_upload','Attachment');
    $crud->display_as('file_upload','Attachment/s');
 
 
    $crud->set_field_upload('photo_upload','assets/uploads/myfiles/photogallery/photos/');
    //$crud->set_field_upload('file_upload','assets/uploads/myfiles/photogallery/files/');
    //$crud->set_field_upload('file_upload','assets/grocery_crud_multiuploader/GC_uploads/files/');
 
 
    $config = array(
            "path_to_directory" =>'assets/grocery_crud_multiuploader/GC_uploads/files/',
            //"allowed_types" =>'gif|jpeg|jpg|png|pdf|doc|html',
            "allowed_types" => 'gif|jpeg|jpg|png|tiff|doc|docx|txt|odt|xls|xlsx|pdf|ppt|pptx|pps|ppsx',
            "show_allowed_types" => true,
            //"no_file_text" =>'No Files',
            "enable_full_path" => false,
            "enable_download_button" => true,
            //"download_allowed" => 'jpg'
    );
 
    $crud->new_multi_upload("file_upload",$config);
    $output = $crud->render();
 
    $this->_example_output($output);
 
  }
  catch(Exception $e){
    show_error($e->getMessage().' --- '.$e->getTraceAsString());
  }
}

Marchoso

Marchoso
  • profile picture
  • Member

Posted 02 March 2020 - 12:33 PM

I am testing the library, but when I edit a record I get the following error when I press the save changes button.

{"success":true,"insert_primary_key":true,"success_message":"

Sus datos han sido actualizados correctamente. Volver a la lista<\/a><\/p>","success_list_url":"http:\/\/localhost\/grocery_crud\/index.php\/Multiuploader\/index\/success\/4"}

 

 

And in the sample database, the first record contains several images, but I can't save anything more than one.

 

 

 

Neither does the record button and return to the list work, it stays on the editing page.