Hello,
Thanks for your great work to this class.
I'm quite new in CI, and try to implement your class in my project.
but, i found some issues about your class in CI 3.
- $this->clean_file_name already not work in CI 3, also will encounter error if i change it to $this->security->sanitize_filename / even $this->security->xss_clean.
For temporary solution i just let the code to be like this
//Sanitize the file name for security. $this->file_name = $this->file_name;
So far, it work, but i don't think it safe.
- Encrypt Name also not work, it return nothing when i set it to TRUE.
here's is my code
// inisialisasi upload file $config = array( 'upload_path' => $dir, 'allowed_types' => 'jpeg|jpg|png', 'overwrite' => TRUE, 'encrypt_name' => TRUE, ); // load Upload library $this->upload->initialize($config); $this->load->library('upload', $config); $this->load->library('image_lib', $config);
but when i print_r it,
the result looks like this
`Array
(
[upload_data] => Array
(
[1] => Array
(
[file_name] => mbuntu_(14).jpg
[file_type] => image/jpeg
[file_path] => (i delete it)/HP-2/
[full_path] => (i delete it)HP-2/mbuntu_(14).jpg
[raw_name] => mbuntu_(14)
[orig_name] => mbuntu_(14).jpg
[client_name] => mbuntu (14).jpg
[file_ext] => .jpg
[file_size] => 111.61
[is_image] => 1
[image_width] => 3200
[image_height] => 2000
[image_type] => jpeg
[image_size_str] => width="3200" height="2000"
)
[2] => Array
(
[file_name] => mbuntu_(20).jpg
[file_type] => image/jpeg
[file_path] => (i delete it)/HP-2/
[full_path] => (i delete it)HP-2/mbuntu_(20).jpg
[raw_name] => mbuntu_(20)
[orig_name] => mbuntu_(20).jpg
[client_name] => mbuntu (20).jpg
[file_ext] => .jpg
[file_size] => 145.02
[is_image] => 1
[image_width] => 2560
[image_height] => 1600
[image_type] => jpeg
[image_size_str] => width="2560" height="1600"
)
)
)
`
Thanks in advance.
hope this issues fixed soon...
Hello,
Thanks for your great work to this class.
I'm quite new in CI, and try to implement your class in my project.
but, i found some issues about your class in CI 3.
For temporary solution i just let the code to be like this
//Sanitize the file name for security. $this->file_name = $this->file_name;So far, it work, but i don't think it safe.
here's is my code
// inisialisasi upload file $config = array( 'upload_path' => $dir, 'allowed_types' => 'jpeg|jpg|png', 'overwrite' => TRUE, 'encrypt_name' => TRUE, ); // load Upload library $this->upload->initialize($config); $this->load->library('upload', $config); $this->load->library('image_lib', $config);but when i print_r it,
the result looks like this
`Array
(
[upload_data] => Array
(
)
`
Thanks in advance.
hope this issues fixed soon...