简体   繁体   中英

set_field_upload in grocery crud not rendering

i am trying to use set_field_upload to upload a images in a database field called "photo", the crud is working perfectly for text/dates...etc

But u can't use the file upload

  • it's not showing as a file button, its only a text input.
  • no errors in console or network.
  • the field type is text, i tried varchar type as well with no luck.

Here is the code

try {
    $crud = new grocery_CRUD();

    $crud->set_table('test');

    $crud->set_field_upload('photo', 'assets/uploads/files');

    $output = $this->grocery_crud->render();
    $this->_example_output($output);

    } catch(Exception $e) {
        show_error($e->getMessage().' --- '.$e->getTraceAsString());
    }

I solved the problem by changing the version, i tried 1.5.8 and 1.5.0.

I got it working by using 1.5.5

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM