Hi,
I found the following issue and thought I might share if someone ever runs across the same:
I had two upload fields:
$crud->set_field_upload('image_url','images/species'); $crud->display_as('image_url','Image'); $crud->set_field_upload('sound_url','sounds/species'); $crud->display_as('sound_url','Sound');
when I uploaded the second file it would replace the first file input and not the second
Looking into the generated html I noticed they had the exact same id's.
I fixed it by changing the function where the id is calculated:
protected function get_upload_file_input($field_info, $value){ ... usleep(2000); //added to prevent same unique id's if both are rendered on the same millisecond $unique = uniqid(); //according to php the randomness is based on the current millisecond
Of course a long term fix can use a better way of randomization other than adding delays to the code, but this is just to illustrate the problem :)
Hope this helps anyone!