I need to upload multiple image, i read a lot of documentation that do not work, and I see this:
I made all what they said and, when I call in my view their controller "multiuploader" it works all fine, but, when I use in my own controller does not work. It saves images into the database and in the folder, but I can not see anything in the form, like the images in add, or the links in the list, even when i save in the same table before with the "multiuploader".
I apreciate a lot if you can help me. Thanks in advance.
This is my controller.
public function Test() {
$this->crud = new Grocery_CRUD_Multiuploader();
$this->crud->set_table('multi_uploader_gallery');
$this->crud->set_subject('Document');
$this->crud->fields("title", "my_pictures", "my_files", "my_mail_attachments");
$this->crud->columns("title", "my_pictures", "my_files", "my_mail_attachments");
$config = array(
/* Destination directory */
"path_to_directory" => 'assets/test',
/* Allowed upload type */
"allowed_types" => 'gif|jpeg|jpg|png',
/* Show allowed file types while editing ? */
"show_allowed_types" => true,
/* No file text */
"no_file_text" => 'No Pictures',
/* enable full path or not for anchor during list state */
"enable_full_path" => false,
/* Download button will appear during read state */
"enable_download_button" => true,
/* One can restrict this button for specific types... */
"download_allowed" => 'jpg'
);
$this->crud->new_multi_upload("my_pictures", $config);
$output = $this->crud->render();
$data['contents'] = 'contents';
$data = array_merge($data, (array) $output);
$this->load->view('template', $data);
}
when I use my view but the example table do not show any errors, but when I use my table it shows this:
I find the error, I do not put a / in the end of the path, and give me all those problems
"path_to_directory" => 'assets/test/',
As for the previous errors I did different tests changing the name of the table and they simply disappeared.